[Libosinfo] [osinfo-db PATCH 5/9] opensuse, autoyast: Accept initrd as injection-method

Fabiano Fidêncio fidencio at redhat.com
Fri Dec 21 14:09:37 UTC 2018


Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 .../opensuse.org/opensuse-autoyast-desktop.xml.in   | 13 +++++++++++--
 .../opensuse.org/opensuse-autoyast-jeos.xml.in      | 13 +++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
index b0227c9..00fc6af 100644
--- a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
+++ b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
@@ -25,6 +25,7 @@
       <param name="avatar-disk" policy="optional"/>
     </config>
     <injection-method>disk</injection-method>
+    <injection-method>initrd</injection-method>
 
     <template>
       <xsl:stylesheet
@@ -104,8 +105,16 @@
         </xsl:template>
 
         <xsl:template match="/command-line">
-            <xsl:text>autoyast=device://sda/</xsl:text>
-            <xsl:value-of select="script/expected-filename"/>
+          <xsl:text>autoyast=</xsl:text>
+          <xsl:choose>
+            <xsl:when test="script/preferred-injection-method = 'initrd'">
+              <xsl:text>file:///</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>device://sda/</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:value-of select="script/expected-filename"/>
         </xsl:template>
 
         <xsl:template match="/install-script-config">
diff --git a/data/install-script/opensuse.org/opensuse-autoyast-jeos.xml.in b/data/install-script/opensuse.org/opensuse-autoyast-jeos.xml.in
index 0079cc5..23f59dd 100644
--- a/data/install-script/opensuse.org/opensuse-autoyast-jeos.xml.in
+++ b/data/install-script/opensuse.org/opensuse-autoyast-jeos.xml.in
@@ -16,6 +16,7 @@
       <param name="admin-password" policy="required"/>
     </config>
     <injection-method>disk</injection-method>
+    <injection-method>initrd</injection-method>
 
     <template>
       <xsl:stylesheet
@@ -95,8 +96,16 @@
         </xsl:template>
 
         <xsl:template match="/command-line">
-            <xsl:text>autoyast=device://sda/</xsl:text>
-            <xsl:value-of select="script/expected-filename"/>
+          <xsl:text>autoyast=</xsl:text>
+          <xsl:choose>
+            <xsl:when test="script-preferred-injection-method = 'initrd'">
+              <xsl:text>file:///</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>device://sda/</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:value-of select="script/expected-filename"/>
         </xsl:template>
 
         <xsl:template match="/install-script-config">
-- 
2.19.2




More information about the Libosinfo mailing list