[virt-tools-list] [PATCH libosinfo 6/7] Add data files for Fedora & Windows unattended installs

Daniel P. Berrange berrange at redhat.com
Thu Mar 1 11:31:08 UTC 2012


On Wed, Feb 29, 2012 at 04:57:50PM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Feb 28, 2012 at 5:26 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> 
> > +        <xsl:template match="/install-script-config">
> > +# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
> > +install
> > +text
> > +keyboard <xsl:value-of select="config/l10n-keyboard"/>
> > +lang <xsl:value-of select="config/l10n-language"/>
> > +<xsl:if test="os/version < 7">
> > +langsupport --default <xsl:value-of select="config/l10n-language"/> <xsl:value-of select="config/l10n-language"/>
> > +mouse generic3ps/2 --device psaux
> > +</xsl:if>
> > +skipx
> > +network --device eth0 --bootproto dhcp
> > +rootpw <xsl:value-of select="config/admin-password"/>
> > +firewall --disabled
> > +authconfig --enableshadow --enablemd5
> > +<xsl:if test="os/version > 1">
> > +selinux --enforcing
> > +</xsl:if>
> > +timezone --utc <xsl:value-of select="config/l10n-timezone"/>
> > +bootloader --location=mbr
> > +zerombr <xsl:if test="os/version < 14">yes</xsl:if>
> > +
> > +clearpart --all --drives=<xsl:call-template name="disk"/>
> > +
> > +<xsl:if test="os/version > 15">
> > +part biosboot --fstype=biosboot --size=1
> > +</xsl:if>
> > +part /boot --fstype <xsl:call-template name="bootfs"/> --size=200 --ondisk=<xsl:call-template name="disk"/>
> > +part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="disk"/>
> > +volgroup VolGroup00 --pesize=32768 pv.2
> > +logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536
> > +logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
> > +reboot
> > +
> > +%packages
> > + at base
> > + at core
> > +<xsl:if test="os/version > 6">
> > + at hardware-support
> > +</xsl:if>
> > +
> > +%end
> > +       </xsl:template>
> 
> With all the escaping involved, I wonder if if would be better in the
> long run to have the templates in a separate file that we point to
> from this XML?

What escaping are you refering to ?  There is only the '>' bit in
the XSL conditional tests, which you'd need regardless of what file
the template is in.

> 
> > diff --git a/data/oses/fedora.xml b/data/oses/fedora.xml
> > index 841349c..39edfb5 100644
> > --- a/data/oses/fedora.xml
> > +++ b/data/oses/fedora.xml
> > @@ -51,6 +51,10 @@
> >       <initrd>images/pxeboot/initrd.img</initrd>
> >       <boot-iso>images/boot.iso</boot-iso>
> >     </tree>
> > +
> > +    <installer>
> > +      <script id='http://fedoraproject.org/scripts/fedora/jeos'/>
> > +    </installer>
> >   </os>
> >
> >   <os id="http://fedoraproject.org/fedora/2">
> > @@ -97,6 +101,10 @@
> >       <initrd>images/pxeboot/initrd.img</initrd>
> >       <boot-iso>images/boot.iso</boot-iso>
> >     </tree>
> > +
> > +    <installer>
> > +      <script id='http://fedoraproject.org/scripts/fedora/jeos'/>
> > +    </installer>
> >   </os>
> 
> Perhaps we could avoid some redundancy here through inheritance?

Yeah, quite possibly - there is a fair bit more I expect to need
to add to the <installer> element first though.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list