[PATCH] Handle inst.{gpt,dnf,extlinux} using cmdline.getbool()
Will Woods
wwoods at redhat.com
Thu Jan 16 23:42:52 UTC 2014
It's good to use cmdline.getbool() for boolean boot args, because
e.g. 'dnf=0' should not enable dnf.
The behavior for these arguments doesn't change, except in the last two
cases listed in the table below:
Argument Old result New result
- disabled¹ disabled¹
nogpt disabled¹ disabled
gpt enabled enabled
gpt=[1|on|true] enabled enabled
gpt=[0|off|false] enabled disabled
gpt=1 nogpt enabled disabled
¹ the flag is left unchanged here, but 'disabled' is the default value
---
pyanaconda/flags.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 2abc703..3fe8a24 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -79,7 +79,8 @@ class Flags(object):
self.read_cmdline()
def read_cmdline(self):
- for f in ("selinux", "debug", "leavebootorder", "testing"):
+ for f in ("selinux", "debug", "leavebootorder", "testing", "extlinux",
+ "gpt", "dnf"):
self.set_cmdline_bool(f)
if "rpmarch" in self.cmdline:
@@ -88,15 +89,6 @@ class Flags(object):
if not selinux.is_selinux_enabled():
self.selinux = 0
- if "extlinux" in self.cmdline:
- self.extlinux = True
-
- if "gpt" in self.cmdline:
- self.gpt = True
-
- if "dnf" in self.cmdline:
- self.dnf = True
-
cmdline_files = ['/proc/cmdline', '/run/install/cmdline',
'/run/install/cmdline.d/*.conf', '/etc/cmdline']
class BootArgs(OrderedDict):
--
1.8.4.2
More information about the anaconda-patches
mailing list