From b44c562e4edbcb506e84cefc29762770802f1079 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Fri, 14 Sep 2012 03:13:35 +0000 Subject: [PATCH] fix the defect that force to stop xcatd for each restart git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/etc/init.d/xcatd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/etc/init.d/xcatd b/xCAT-server/etc/init.d/xcatd index 3c76ce9ac..734542e92 100755 --- a/xCAT-server/etc/init.d/xcatd +++ b/xCAT-server/etc/init.d/xcatd @@ -76,7 +76,8 @@ restart) fi $STATUS > /dev/null 2>&1 if [ "$?" = "0" ]; then - if ! nodels --version |grep -q 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case + ver=`nodels --version` + if [[ $ver < "Version 2.6" ]]; then # force to stop xcatd first when update from version earlier than 2.6 $0 stop fi fi @@ -89,7 +90,8 @@ reload) fi $STATUS > /dev/null 2>&1 if [ "$?" = "0" ]; then - if ! nodels --version |grep -q 'Version 2.6'; then #upgrade or downgrade from another major release, stop it just in case + ver=`nodels --version` + if [[ $ver < "Version 2.6" ]]; then # force to stop xcatd first when update from version earlier than 2.6 $0 stop fi fi