From 3a0dd3becedf6bfcbfc4c5abedc182bb97118293 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 16 Feb 2009 10:33:01 +0000 Subject: [PATCH] use apache2 service to check httpd service on SLES, xcatconfig updated git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2751 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index ee89fb7d5..107e61157 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1155,7 +1155,12 @@ if ($::osname eq 'Linux') } # restart httpd - my $cmd = "/etc/init.d/httpd stop; /etc/init.d/httpd start"; + my $cmd; + if(-e "/etc/init.d/apache2") {#for sles + $cmd = "/etc/init.d/apache2 stop; /etc/init.d/apache2 start"; + }else { + $cmd = "/etc/init.d/httpd stop; /etc/init.d/httpd start"; + } my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -1167,7 +1172,11 @@ if ($::osname eq 'Linux') } # enable httpd - my $cmd = "/sbin/chkconfig httpd on"; + if(-e "/etc/init.d/apache2") {#for sles + $cmd = "/sbin/chkconfig apache2 on"; + }else { + $cmd = "/sbin/chkconfig httpd on"; + } my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) {