summaryrefslogtreecommitdiffstats
path: root/flags.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-02-23 23:35:24 +0000
committerJeremy Katz <katzj@redhat.com>2004-02-23 23:35:24 +0000
commit4c004cc1216355307d79bfff437249fa5e20caa0 (patch)
tree8178033ebb5695bd19f29e9e61eece910e7b2d7b /flags.py
parente0f6e8531d17179a1c8e117e3e976d1d320bb287 (diff)
downloadanaconda-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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/flags.py b/flags.py
index fda4f5216..1b63454f3 100644
--- a/flags.py
+++ b/flags.py
@@ -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()