[PATCH 8/8] Really put appended kernel cmdline arguments at the end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Due to the auto generation of dracut cmdline, append arguments like
"quiet rhgb" would no longer be at the end of the kernel cmdline in grub,
making it (slightly) harder to remove them for debugging purposes.
---
 booty/bootloaderInfo.py |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index c004461..0684d1c 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -102,10 +102,14 @@ class KernelArguments:
         args += self.id.instLanguage.dracutSetupString()
         args += self.id.keyboard.dracutSetupString()
 
-        return args
+        if args and self.appendArgs:
+            args += " "
+
+        return args + self.appendArgs
 
     def set(self, args):
         self.args = args
+        self.appendArgs = ""
 
     def chandevget(self):
         return self.cargs
@@ -114,13 +118,16 @@ class KernelArguments:
         self.cargs = args
 
     def append(self, args):
-        if self.args:
-            # don't duplicate the addition of an argument (#128492)
-            if self.args.find(args) != -1:
-                return
-            self.args = self.args + " "
-        self.args = self.args + "%s" % (args,)
-        
+        # don't duplicate the addition of an argument (#128492)
+        if self.args.find(args) != -1:
+            return
+        if self.appendArgs.find(args) != -1:
+            return
+
+        if self.appendArgs:
+            self.appendArgs += self.args + " "
+
+        self.appendArgs += args
 
     def __init__(self, instData):
         newArgs = []
@@ -160,6 +167,7 @@ class KernelArguments:
                 newArgs.append(arg)
 
         self.args = " ".join(newArgs)
+        self.appendArgs = ""
         self.id = instData
 
 
-- 
1.6.4.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux