Another SuSE-related patch. This one fixes "cobbler check" so that it
doesn't see suse as an unknown distribution when checking the running
services. It also checks for service apache2 instead of httpd if the
distro is SuSE.
---
cobbler/action_check.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/cobbler/action_check.py b/cobbler/action_check.py
index 99fffbb..416267f 100644
--- a/cobbler/action_check.py
+++ b/cobbler/action_check.py
@@ -95,7 +95,7 @@ class BootCheck:
if notes != "":
notes = " (NOTE: %s)" % notes
rc = 0
- if utils.check_dist() == "redhat":
+ if utils.check_dist() == "redhat" or utils.check_dist() ==
"suse":
if os.path.exists("/etc/rc.d/init.d/%s" % which):
rc = sub_process.call("/sbin/service %s status
/dev/null 2>/dev/null" % which, shell=True, close_fds=True)
if rc != 0:
@@ -185,7 +185,10 @@ class BootCheck:
"""
Check if Apache is installed.
"""
- self.check_service(status,"httpd")
+ if utils.check_dist()=="suse":
+ self.check_service(status, "apache2")
+ else:
+ self.check_service(status,"httpd")
def check_dhcpd_bin(self,status):
--
1.5.6
--
Kevin James
Applied Technology Senior Strategist
Novell Global Enablement
------------------------
Novell, Inc.
http://www.novell.com