From 7808293df27aae8fac6d98ff36d914a721642091 Mon Sep 17 00:00:00 2001 From: lissav Date: Sat, 5 Nov 2011 10:48:41 +0000 Subject: [PATCH] Only chkconfig xcat on during initial install, so will not change admin settings git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10973 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/xCAT-server.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 1ff537109..2060040af 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -190,12 +190,15 @@ rm -rf $RPM_BUILD_ROOT %post %ifos linux ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd -if [ -x /usr/lib/lsb/install_initd ]; then - /usr/lib/lsb/install_initd /etc/init.d/xcatd -elif [ -x /sbin/chkconfig ]; then - /sbin/chkconfig --add xcatd -else - echo "Unable to register init scripts on this system" + +if [ "$1" = "1" ]; then #Only if installing for the first time.. + if [ -x /usr/lib/lsb/install_initd ]; then + /usr/lib/lsb/install_initd /etc/init.d/xcatd + elif [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --add xcatd + else + echo "Unable to register init scripts on this system" + fi fi if [ "$1" -gt "1" ]; then #only on upgrade... #migration issue for monitoring