[Libosinfo] [PATCH 1/8] winxp, installer: Don't assume script disk is specified
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Mon Jan 28 03:18:40 UTC 2013
From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
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 > 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
More information about the Libosinfo
mailing list