mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-16 11:20:32 +00:00
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:
@ -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"
|
||||
|
Reference in New Issue
Block a user