[Libosinfo] [PATCH 09/10] fedora,script: Correctly handle netiso

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed May 13 17:48:35 UTC 2015


The fedora install script was written for and tested against installer
DVDs so it does not work for netiso. This patch fixes the issue by
removing the install method commands and adding remote repos if the
media is detected to be a netiso.

https://bugzilla.redhat.com/show_bug.cgi?id=1178787
---
 data/install-scripts/fedora.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml
index c4264e5..ec37005 100644
--- a/data/install-scripts/fedora.xml
+++ b/data/install-scripts/fedora.xml
@@ -94,8 +94,10 @@
 
         <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'">
 install
 cdrom
+</xsl:if>
 text
 keyboard '<xsl:call-template name="keyboard"/>'
 lang <xsl:value-of select="config/l10n-language"/>
@@ -127,6 +129,12 @@ 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'">
+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
+</xsl:if>
+
 %packages
 <xsl:choose>
   <xsl:when test="os/version < 18">
@@ -250,8 +258,10 @@ reboot
 
         <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'">
 install
 cdrom
+</xsl:if>
 keyboard '<xsl:call-template name="keyboard"/>'
 lang <xsl:value-of select="config/l10n-language"/>
 network --onboot yes --bootproto dhcp --noipv6 --hostname=<xsl:value-of select="config/hostname"/>
@@ -274,6 +284,12 @@ 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'">
+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
+</xsl:if>
+
 %packages
 <xsl:choose>
   <xsl:when test="os/version < 18">
-- 
2.1.0




More information about the Libosinfo mailing list