[rhel7-branch 28/29] Preserve kickstart url behavior for mirrorlist (#1109933)

bcl installerbot-noreply at redhat.com
Tue Jun 2 00:31:29 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

url could be --mirrorlist instead of --url. Don't assume url is set, and
for mirrorlist pass inst.repo=None to preserve current behavior (there
is no cmdline way to represent a mirrorlist).

Related: rhbz#1109933
(cherry picked from commit 9c888835f1be87553729d774fe46b98bbabf0081)

Related: rhbz#1196721
---
 dracut/parse-kickstart | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 82d9079..7811352 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -95,7 +95,11 @@ class NFS(commands.nfs.FC6_NFS):
 class URL(commands.url.F18_Url):
     def dracut_args(self, args, lineno, obj):
         # Spaces in the url need to be %20
-        method = self.url.replace(" ", "%20")
+        if self.url:
+            method = self.url.replace(" ", "%20")
+        else:
+            method = None
+
         args = ["inst.repo=%s" % method]
 
         if self.noverifyssl:


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/3320d615b467b4046a40909ea134b651a85ff058


More information about the anaconda-patches mailing list