Hi,
It appears that the first part of this patch (line 99, adding a check for suse in the check_service function) didn't get applied - only the second part (checking for apache2 instead of httpd if the distro is suse).
Oversight? Or did I get something wrong?
Cheers, KEv.
On Mon, 2008-12-22 at 11:41 -0500, Michael DeHaan wrote:
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
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Kevin James wrote:
Hi,
It appears that the first part of this patch (line 99, adding a check for suse in the check_service function) didn't get applied - only the second part (checking for apache2 instead of httpd if the distro is suse).
Oversight? Or did I get something wrong?
Cheers, KEv.
Yep, oversight on my part. I had made some changes to keep the check_dist() function from being called more than once and missed the change to the first conditional.
It's fixed on master now (and will be in 1.4.1 and also merged into devel).
If you have any other patches for SuSE support things, we can apply those to devel.
--Michael
On Mon, 2008-12-22 at 11:41 -0500, Michael DeHaan wrote:
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
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
cobbler@lists.fedorahosted.org