From 93e4f57a26f68a2c8577d6fb594a5b373c2d4b7b Mon Sep 17 00:00:00 2001 From: mxi1 Date: Thu, 1 Apr 2010 08:16:00 +0000 Subject: [PATCH] make the apache2 service starts automatically on SLES when xCATsn is installed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5635 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCATsn/xCATsn.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index cce1b6215..b448d6d2e 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -88,12 +88,17 @@ if [ -f /etc/xCATMN ]; then fi %ifos linux +if [ -e "/etc/redhat-release" ]; then + apachedaemon='httpd' +else # SuSE + apachedaemon='apache2' +fi + # start xcatd - chkconfig httpd on + chkconfig $apachedaemon on if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start - /etc/init.d/httpd stop - /etc/init.d/httpd start + /etc/init.d/$apachedaemon reload fi echo "xCATsn is now installed" %endif