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
This commit is contained in:
mxi1 2009-02-16 10:33:01 +00:00
parent b8b41f86a7
commit 3a0dd3bece

View File

@ -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)
{