do not use nodels --version in /etc/init.d/xcatd

This commit is contained in:
ligc 2014-01-02 14:39:40 +08:00
parent 2cca891e35
commit 66bb1bc712

View File

@ -76,7 +76,12 @@ restart)
fi
$STATUS > /dev/null 2>&1
if [ "$?" = "0" ]; then
ver=`nodels --version`
if [ ! -z $XCATROOT ]; then
XCATLIBPATH="$XCATROOT/lib/perl"
else
XCATLIBPATH="/opt/xcat/lib/perl"
fi
ver=`perl -I $XCATLIBPATH -mxCAT::Version -e 'print xCAT::Version::Version()'`
if [ "$ver" \< "Version 2.6" ]; then # force to stop xcatd first when update from version earlier than 2.6
$0 stop
fi
@ -90,7 +95,12 @@ reload)
fi
$STATUS > /dev/null 2>&1
if [ "$?" = "0" ]; then
ver=`nodels --version`
if [ ! -z $XCATROOT ]; then
XCATLIBPATH="$XCATROOT/lib/perl"
else
XCATLIBPATH="/opt/xcat/lib/perl"
fi
ver=`perl -I $XCATLIBPATH -mxCAT::Version -e 'print xCAT::Version::Version()'`
if [ "$ver" \< "Version 2.6" ]; then # force to stop xcatd first when update from version earlier than 2.6
$0 stop
fi