[PATCH 1/8] winxp, installer: Don't assume script disk is specified

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

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

Declare that script optionally uses script disk if specified and hardcode
a fallback for the case when its not specified.
---
 data/install-scripts/windows-sif.xml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index 2947efa..c072f4b 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -77,6 +77,7 @@
       <param name="reg-product-key" policy="required"/>
       <param name="user-realname" policy="required"/>
       <param name="hostname" policy="required"/>
+      <param name="script-disk" policy="optional"/>
     </config>
     <template>
       <xsl:stylesheet
@@ -85,6 +86,17 @@
 
         <xsl:output method="text"/>
 
+        <xsl:template name="script-disk">
+          <xsl:choose>
+            <xsl:when test="config/script-disk != ''">
+              <xsl:value-of select="config/script-disk"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>A</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
         <xsl:template name="password">
          <xsl:choose>
           <xsl:when test="os/version = 5.1">
@@ -182,7 +194,7 @@
 
 <xsl:if test="os/version &gt; 5.0">
 [SetupParams]
-    UserExecute = "<xsl:value-of select="config/script-disk"/>:\windows.cmd"
+    UserExecute = "<xsl:call-template name="script-disk"/>:\windows.cmd"
 
 [WindowsFirewall]
     Profiles = WindowsFirewall.TurnOffFirewall
-- 
1.8.1

_______________________________________________
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