Another SuSE-related patch. As SuSE doesn't use SELinux,
the /usr/sbin/selinuxenabled command isn't there. This patch makes
is_selinux_enabled return false if it can't find the command.


---
cobbler/utils.py |    2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cobbler/utils.py b/cobbler/utils.py
index 64ad96b..5bbacdd 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -1228,6 +1228,8 @@ def safe_filter(var):
        raise CX("Invalid characters found in input")

def is_selinux_enabled():
+    if not os.path.exists("/usr/sbin/selinuxenabled"):
+      return False
     args = "/usr/sbin/selinuxenabled"
     selinuxenabled = sub_process.call(args,close_fds=True)
     if selinuxenabled == 0:
-- 
1.5.6

-- 
Kevin James
Applied Technology Senior Strategist
Novell Global Enablement
------------------------
Novell, Inc.
http://www.novell.com

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to