From c55553e5df09e17680f4f3a2e7eaa2215157455d Mon Sep 17 00:00:00 2001 From: arifali Date: Sat, 14 Apr 2012 22:33:11 +0000 Subject: [PATCH] xcat-server: fix enable apache2 for ubuntu/debian when xcat is installed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12239 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 0898da856..9f97188ec 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1738,7 +1738,7 @@ sub setuphttp my $cmd; # restart httpd if (-e "/etc/init.d/apache2") - { #for sles + { #for sles/ubuntu $cmd = "/etc/init.d/apache2 stop; /etc/init.d/apache2 start"; } else @@ -1758,8 +1758,15 @@ sub setuphttp # enable httpd if (-e "/etc/init.d/apache2") - { #for sles - $cmd = "/sbin/chkconfig apache2 on"; + { + if (is_lsb_ubuntu()) + { # for ubuntu + $cmd = "/usr/sbin/update-rc.d apache2 enable"; + } + else + { # for sles + $cmd = "/sbin/chkconfig apache2 on"; + } } else {