Kevin James wrote:
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):
I was getting some weird "corrupt patch" content on this one, was this
generated using "git-format-patch" ? If so, I might recommend using
attachments so mail readers
don't get in the way.
Either way, this is a good feature and I've applied it, with some minor
changes -- namely only making the "utils.check_dist()" call once and
just saving the value.
As this was a simple patch, I've applied this on both devel and master
branches.
--Michael