2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-05 20:35:34 +00:00

Merge pull request #1014 from immarvin/onxcatspec

fix issue  [Customere]xcatd service can not be started automatically after reboot for RHEL7.2 #492
This commit is contained in:
Xiaopeng Wang
2016-04-29 17:18:54 +08:00

View File

@ -413,14 +413,15 @@ fi
ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd
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
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add xcatd
elif [ -x /usr/lib/lsb/install_initd ]; then
/usr/lib/lsb/install_initd /etc/init.d/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
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab filename=monitorctrl.pm notification -d
@ -463,10 +464,11 @@ if [ $1 == 0 ]; then #This means only on -e
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
/etc/init.d/xcatd stop
fi
if [ -x /usr/lib/lsb/remove_initd ]; then
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del xcatd
elif [ -x /usr/lib/lsb/remove_initd ]; then
/usr/lib/lsb/remove_initd /etc/init.d/xcatd
elif [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del xcatd
fi
rm -f /usr/sbin/xcatd #remove the symbolic