diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-02-23 23:35:24 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-02-23 23:35:24 +0000 |
commit | 4c004cc1216355307d79bfff437249fa5e20caa0 (patch) | |
tree | 8178033ebb5695bd19f29e9e61eece910e7b2d7b /flags.py | |
parent | e0f6e8531d17179a1c8e117e3e976d1d320bb287 (diff) | |
download | anaconda-4c004cc1216355307d79bfff437249fa5e20caa0.tar.gz anaconda-4c004cc1216355307d79bfff437249fa5e20caa0.tar.xz anaconda-4c004cc1216355307d79bfff437249fa5e20caa0.zip |
make selinux a full featured flag
Diffstat (limited to 'flags.py')
-rw-r--r-- | flags.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -11,6 +11,8 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # +import os + # A lot of effort, but it only allows a limited set of flags to be referenced class Flags: @@ -35,6 +37,16 @@ class Flags: self.__dict__['flags']['autostep'] = 0 self.__dict__['flags']['autoscreenshot'] = 0 self.__dict__['flags']['usevnc'] = 0 + self.__dict__['flags']['selinux'] = 0 + + + # determine if selinux is enabled or not + f = open("/proc/cmdline", "r") + line = f.readline() + f.close() + if os.path.exists("/selinux/load") and line.find(" selinux=0") == -1: + self.__dict__['flags']['selinux'] = 1 + global flags flags = Flags() |