avij / rpms / anaconda

Forked from rpms/anaconda 5 years ago
Clone

Blame SOURCES/0005-main-Set-flags.extlinux-if-extlinux-is-used-in-inter.patch

fbcaed
From ef84a6c944b5a877e5d268845f08ad01f4859790 Mon Sep 17 00:00:00 2001
fbcaed
From: Colin Walters <walters@verbum.org>
fbcaed
Date: Sun, 4 May 2014 22:54:28 +0000
fbcaed
Subject: [PATCH 05/20] main: Set flags.extlinux if extlinux is used in
fbcaed
 interactive-defaults.ks
fbcaed
fbcaed
For making a custom Project Atomic boot ISO, I tried adding
fbcaed
"bootloader --extlinux" to /usr/share/anaconda/interactive-defaults.ks.
fbcaed
fbcaed
Confusingly this doesn't work because extlinux is a flag, and not just
fbcaed
a kickstart variable; the flag is set by the dracut KS parser. (Does
fbcaed
extlinux really need to be a flag?)
fbcaed
fbcaed
This small patch just ensures the flag is set if the KS enables
fbcaed
extlinux.
fbcaed
fbcaed
Note: I left a log.info in there since it seems useful to log when
fbcaed
we're parsing a KS file, but feel free to remove it.
fbcaed
fbcaed
Resolves: rhbz#1113535
fbcaed
Port of rpmostreepayload patches from master
fbcaed
commit f4921edf42d57523e8b42ba21d79e78a47d88e8b
fbcaed
---
fbcaed
 anaconda | 5 +++++
fbcaed
 1 file changed, 5 insertions(+)
fbcaed
fbcaed
diff --git a/anaconda b/anaconda
fbcaed
index 2a802a3..0cd031f 100755
fbcaed
--- a/anaconda
fbcaed
+++ b/anaconda
fbcaed
@@ -903,6 +903,7 @@ if __name__ == "__main__":
fbcaed
             continue
fbcaed
 
fbcaed
         kickstart.preScriptPass(f)
fbcaed
+        log.info("Parsing kickstart: " + f)
fbcaed
         ksdata = kickstart.parseKickstart(f)
fbcaed
 
fbcaed
         # Only load the first defaults file we find.
fbcaed
@@ -911,6 +912,10 @@ if __name__ == "__main__":
fbcaed
     if not ksdata:
fbcaed
         ksdata = kickstart.AnacondaKSHandler(addon_paths["ks"])
fbcaed
 
fbcaed
+    # Pick up any changes from interactive-defaults.ks that would
fbcaed
+    # otherwise be covered by the dracut KS parser.
fbcaed
+    if ksdata.bootloader.extlinux:
fbcaed
+        flags.extlinux = True
fbcaed
     if ksdata.rescue.rescue:
fbcaed
         anaconda.rescue = True
fbcaed
 
fbcaed
-- 
fbcaed
1.9.3
fbcaed