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

Fabiano Fidêncio fidencio at redhat.com
Fri Apr 12 01:09:58 UTC 2013


---
 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 != ''">
+            <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 > 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 != ''">
+            <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 > 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 != ''">
+            <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 != ''">
+            <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
-- 
1.8.2




More information about the Libosinfo mailing list