From 7b6db33399d302f0e4a0def6356ece1a4b5050ee Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Thu, 14 Oct 2010 19:55:18 +0000 Subject: [PATCH] Fixed more problems in xcatd init.d script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7860 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/etc/init.d/xcatd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xCAT-server/etc/init.d/xcatd b/xCAT-server/etc/init.d/xcatd index a6ac8e57a..136c099ad 100755 --- a/xCAT-server/etc/init.d/xcatd +++ b/xCAT-server/etc/init.d/xcatd @@ -71,29 +71,29 @@ fi case $1 in restart) echo -n "Restarting xCATd " - $STATUS >& /dev/null - if [ "$?" == "0" ]; then - if ! nodels --version |grep 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case - $0 stop - fi - fi if [ -r /etc/profile.d/xcat.sh ]; then . /etc/profile.d/xcat.sh + fi + $STATUS >& /dev/null + if [ "$?" == "0" ]; then + if ! nodels --version |grep -q 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case + $0 stop + fi fi xcatd -p /var/run/xcatd.pid && $LOG_SUCCESS || $LOG_FAILURE ;; reload) echo -n "Reloading xCATd " + if [ -r /etc/profile.d/xcat.sh ]; then + . /etc/profile.d/xcat.sh + fi $STATUS >& /dev/null if [ "$?" == "0" ]; then - if ! nodels --version |grep 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case + if ! nodels --version |grep -q 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case $0 stop fi fi export XCATRELOAD=yes - if [ -r /etc/profile.d/xcat.sh ]; then - . /etc/profile.d/xcat.sh - fi xcatd -p /var/run/xcatd.pid && $LOG_SUCCESS || $LOG_FAILURE ;; status)