[Libosinfo] [PATCHv2 1/2] fedora, script: More generic test for netinstaller
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Wed May 27 16:25:34 UTC 2015
Instead of checking if variant is 'netinst', let's check if it contains
'netinst' in it. In Fedora 22, networkinstaller media are provided for
both Server and Workstation variant so we'll need two different variants
for both but the same installer script could be used with both.
---
data/install-scripts/fedora.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml
index ec37005..09233ed 100644
--- a/data/install-scripts/fedora.xml
+++ b/data/install-scripts/fedora.xml
@@ -94,7 +94,7 @@
<xsl:template match="/install-script-config">
# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
-<xsl:if test="count(media/variant) = 0 or media/variant != 'netinst'">
+<xsl:if test="count(media/variant) = 0 or not(contains(media/variant, 'netinst'))">
install
cdrom
</xsl:if>
@@ -129,7 +129,7 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow
logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
reboot
-<xsl:if test="media/variant = 'netinst'">
+<xsl:if test="contains(media/variant, 'netinst')">
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch
@@ -258,7 +258,7 @@ url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-
<xsl:template match="/install-script-config">
# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
-<xsl:if test="count(media/variant) = 0 or media/variant != 'netinst'">
+<xsl:if test="count(media/variant) = 0 or not(contains(media/variant, 'netinst'))">
install
cdrom
</xsl:if>
@@ -284,7 +284,7 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow
logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
reboot
-<xsl:if test="media/variant = 'netinst'">
+<xsl:if test="contains(media/variant, 'netinst')">
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch
--
2.1.0
More information about the Libosinfo
mailing list