Re: [PATCHv2 2/2] rhel, fedora: Add kickstart commandline

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

 



On Fri, Apr 12, 2013 at 4:09 AM, Fabiano Fidêncio <fidencio@xxxxxxxxxx> wrote:
> ---
>  data/install-scripts/fedora.xml | 34 ++++++++++++++++++++++++++++++++++
>  data/install-scripts/rhel.xml   | 34 ++++++++++++++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
>
> diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml
> index b5b20bb..a52fc09 100644
> --- a/data/install-scripts/fedora.xml
> +++ b/data/install-scripts/fedora.xml
> @@ -9,6 +9,7 @@
>        <param name="l10n-language" policy="optional"/>
>        <param name="l10n-timezone" policy="optional"/>
>        <param name="target-disk" policy="optional"/>
> +      <param name="script-disk" policy="required"/>
>      </config>
>      <template>
>        <xsl:stylesheet
> @@ -37,6 +38,15 @@
>            </xsl:choose>
>          </xsl:template>
>
> +        <xsl:template name="script-disk">
> +          <xsl:if test="config/script-disk != ''">

This check is redundant as script-disk is now mandatory.

> +            <xsl:variable name="script-disk">
> +              <xsl:value-of select="config/script-disk"/>
> +            </xsl:variable>
> +            <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
> +          </xsl:if>
> +        </xsl:template>
> +
>
>         <xsl:template name="rootfs">
>           <xsl:choose>
>             <xsl:when test="os/version &gt; 10">
> @@ -74,6 +84,13 @@
>           </xsl:choose>
>         </xsl:template>
>
> +        <xsl:template match="/command-line">
> +            <xsl:text>ks=hd:</xsl:text>
> +            <xsl:call-template name="script-disk"/>
> +            <xsl:text>:/</xsl:text>
> +            <xsl:value-of select="script/expected-filename"/>
> +        </xsl:template>
> +
>          <xsl:template match="/install-script-config">
>  # Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
>  install
> @@ -143,6 +160,7 @@ reboot
>          <param name="avatar-location" policy="optional"/>
>          <param name="avatar-disk" policy="optional"/>
>          <param name="target-disk" policy="optional"/>
> +        <param name="script-disk" policy="required"/>
>      </config>
>      <avatar-format>
>        <mime-type>image/png</mime-type>
> @@ -174,6 +192,15 @@ reboot
>            </xsl:choose>
>          </xsl:template>
>
> +        <xsl:template name="script-disk">
> +          <xsl:if test="config/script-disk != ''">

Same here.

> +            <xsl:variable name="script-disk">
> +              <xsl:value-of select="config/script-disk"/>
> +            </xsl:variable>
> +            <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
> +          </xsl:if>
> +        </xsl:template>
> +
>         <xsl:template name="rootfs">
>           <xsl:choose>
>             <xsl:when test="os/version &gt; 10">
> @@ -211,6 +238,13 @@ reboot
>           </xsl:choose>
>         </xsl:template>
>
> +        <xsl:template match="/command-line">
> +            <xsl:text>ks=hd:</xsl:text>
> +            <xsl:call-template name="script-disk"/>
> +            <xsl:text>:/</xsl:text>
> +            <xsl:value-of select="script/expected-filename"/>
> +        </xsl:template>
> +
>          <xsl:template match="/install-script-config">
>  # Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
>  install
> diff --git a/data/install-scripts/rhel.xml b/data/install-scripts/rhel.xml
> index 37cf410..f26adc2 100644
> --- a/data/install-scripts/rhel.xml
> +++ b/data/install-scripts/rhel.xml
> @@ -9,6 +9,7 @@
>        <param name="l10n-language" policy="optional"/>
>        <param name="l10n-timezone" policy="optional"/>
>        <param name="target-disk" policy="optional"/>
> +      <param name="script-disk" policy="required"/>
>      </config>
>      <template>
>        <xsl:stylesheet
> @@ -33,6 +34,22 @@
>            </xsl:choose>
>          </xsl:template>
>
> +        <xsl:template name="script-disk">
> +          <xsl:if test="config/script-disk != ''">

Here too

> +            <xsl:variable name="script-disk">
> +              <xsl:value-of select="config/script-disk"/>
> +            </xsl:variable>
> +            <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
> +          </xsl:if>
> +        </xsl:template>
> +
> +        <xsl:template match="/command-line">
> +            <xsl:text>ks=hd:</xsl:text>
> +            <xsl:call-template name="script-disk"/>
> +            <xsl:text>:/</xsl:text>
> +            <xsl:value-of select="script/expected-filename"/>
> +        </xsl:template>
> +
>          <xsl:template match="/install-script-config">
>  # Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
>  install
> @@ -92,6 +109,7 @@ reboot
>          <param name="avatar-location" policy="optional"/>
>          <param name="avatar-disk" policy="optional"/>
>          <param name="target-disk" policy="optional"/>
> +        <param name="script-disk" policy="required"/>
>      </config>
>      <avatar-format>
>        <mime-type>image/png</mime-type>
> @@ -119,6 +137,22 @@ reboot
>            </xsl:choose>
>          </xsl:template>
>
> +        <xsl:template name="script-disk">
> +          <xsl:if test="config/script-disk != ''">

And here.

> +            <xsl:variable name="script-disk">
> +              <xsl:value-of select="config/script-disk"/>
> +            </xsl:variable>
> +            <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
> +          </xsl:if>
> +        </xsl:template>
> +
> +        <xsl:template match="/command-line">
> +            <xsl:text>ks=hd:</xsl:text>
> +            <xsl:call-template name="script-disk"/>
> +            <xsl:text>:/</xsl:text>
> +            <xsl:value-of select="script/expected-filename"/>
> +        </xsl:template>
> +
>          <xsl:template match="/install-script-config">
>  # Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
>  install

ACK with redundant ifs removed.

--
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux