[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Tue, Feb 28, 2012 at 5:26 PM, Daniel P. Berrange <berrange redhat com> wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
>
> For Fedora this adds a kickstart file template which self-adapts
> to all Fedora versions 1-> 16
>
> For Windows this adds two file templates, one using the legacy
> SIF .ini file format for Win2k3 or earlier, and the other using
> the modern unattended XML format for Win2k8 or newer

Looks good. Some comments below:

> +        <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 &lt; 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 &gt; 1">
> +selinux --enforcing
> +</xsl:if>
> +timezone --utc <xsl:value-of select="config/l10n-timezone"/>
> +bootloader --location=mbr
> +zerombr <xsl:if test="os/version &lt; 14">yes</xsl:if>
> +
> +clearpart --all --drives=<xsl:call-template name="disk"/>
> +
> +<xsl:if test="os/version &gt; 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
> + base
> + core
> +<xsl:if test="os/version &gt; 6">
> + 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?

> 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?

> diff --git a/data/oses/windows.xml b/data/oses/windows.xml
> index 69dec27..37b2afa 100644
> --- a/data/oses/windows.xml
> +++ b/data/oses/windows.xml
> @@ -155,6 +155,10 @@
>         <storage>1610612736</storage>
>       </minimum>
>     </resources>
> +
> +    <installer>
> +      <script id='http://microsoft.com/windows/sif'/>
> +    </installer>

Same comment here as for fedora above.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]