Fix xCAT init script status reporting

xCAT in some cases was reporting improper status for certain scenarios.
Risk being inaccure if no pid file exists so that it is accurate when it
does exist.
This commit is contained in:
Jarrod Johnson 2014-02-07 17:37:56 -05:00
parent 1d64d9ce82
commit 504dc16571

View File

@ -37,7 +37,12 @@ RHFailure()
}
MStatus()
{
ps ax|grep -v grep|grep xcatd: > /dev/null 2>&1
PID=`cat /var/run/xcatd.pid`
if [ -z "$PID" ]; then
echo "xCAT service is not running"
return 3
fi
ps $PID|grep xcatd: > /dev/null 2>&1
if [ "$?" = "0" ]; then
RVAL=0
echo "xCAT service is running"