-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1194 from vojtechtrefny/3.9-devel_flags-update
Remove unused flags and do not read flags from boot command line
- Loading branch information
Showing
1 changed file
with
0 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,6 @@ | |
# Red Hat Author(s): David Lehman <[email protected]> | ||
# | ||
|
||
import shlex | ||
|
||
|
||
class Flags(object): | ||
|
||
def __init__(self): | ||
|
@@ -47,7 +44,6 @@ def __init__(self): | |
self.selinux = selinux.is_selinux_enabled() | ||
|
||
self.ibft = True | ||
self.noiswmd = False | ||
|
||
self.gfs2 = True | ||
|
||
|
@@ -81,9 +77,6 @@ def __init__(self): | |
# (so far only for LUKS) | ||
self.discard_new = False | ||
|
||
self.boot_cmdline = {} | ||
|
||
self.update_from_boot_cmdline() | ||
self.allow_imperfect_devices = True | ||
|
||
# compression option for btrfs filesystems | ||
|
@@ -99,20 +92,5 @@ def __init__(self): | |
# Allow online filesystem resizes | ||
self.allow_online_fs_resize = False | ||
|
||
def get_boot_cmdline(self): | ||
with open("/proc/cmdline") as f: | ||
buf = f.read().strip() | ||
args = shlex.split(buf) | ||
for arg in args: | ||
(opt, _equals, val) = arg.partition("=") | ||
if val: | ||
self.boot_cmdline[opt] = val | ||
|
||
def update_from_boot_cmdline(self): | ||
self.get_boot_cmdline() | ||
self.multipath = "nompath" not in self.boot_cmdline | ||
self.noiswmd = "noiswmd" in self.boot_cmdline | ||
self.gfs2 = "gfs2" in self.boot_cmdline | ||
|
||
|
||
flags = Flags() |