add the more addional log information to postscripts

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5681 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wuzhy 2010-04-06 08:18:30 +00:00
parent 4e780ead9b
commit 9bd447f402

View File

@ -26,14 +26,14 @@ fi
#check if rsct is installed and running
if [ ! -e /usr/bin/lsrsrc ]; then
logger xCAT "RMC setup on node $NODE: RSCT is not is not installed."
logger -t xCAT "RMC setup on node $NODE: RSCT is not is not installed."
exit 1;
else
PID=`/bin/ps -ef | /bin/grep rmcd | /bin/grep -v grep | /bin/awk '{print $2}'`
if [ -z "$PID" ]; then
result=`/usr/sbin/rsct/bin/rmcctrl -s 2>&1`;
if [ $? -gt 0 ]; then
logger xCAT "RMC deamon cannot be started on node $NODE:$result"
logger -t xCAT "RMC deamon cannot be started on node $NODE:$result"
exit 1;
fi
fi
@ -61,7 +61,7 @@ do
done
if [[ $rc -ne 0 ]]
then
logger xCAT "RMC subsystem has not started"
logger -t xCAT "RMC subsystem has not started"
exit 1
fi
@ -79,7 +79,7 @@ if [ $ADD -eq 1 ]; then
result=`/usr/sbin/rsct/install/bin/recfgctnid $NODEID 2>&1`
if [ $? -ne 0 ]; then
echo "Reset nodeid: $result"
logger xCAT "Reset nodeid: $result"
logger -t xCAT "Reset nodeid: $result"
fi
else
#stop all rmc daemons
@ -103,7 +103,7 @@ if [ $ADD -eq 1 ]; then
result=`/usr/sbin/rsct/install/bin/recfgct -s 2>&1`
if [ $? -ne 0 ]; then
echo "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
logger xCAT "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
logger -t xCAT "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
fi
fi
fi
@ -142,7 +142,7 @@ if [ $ADD -eq 1 ]; then
done
if [[ $rc -ne 0 ]]
then
logger xCAT "RMC subsystem has not started"
logger -t xCAT "RMC subsystem has not started"
exit 1
fi
@ -162,14 +162,14 @@ if [ $ADD -eq 1 ]; then
ms_ip=`expr substr "$result" $pos $length`
else
echo "RMC setup on node $NODE:$result"
logger xCAT "RMC setup on node $NODE:$result"
logger -t xCAT "RMC setup on node $NODE:$result"
fi
#define resource in IBM.MCP class on node
result1=`/usr/bin/mkrsrc-api IBM.MCP::MNName::"$NODE"::KeyToken::"$MONMASTER"::IPAddresses::"{\"$ms_ip\"}"::NodeID::0x$MS_NODEID 2>&1`
if [ $? -gt 0 ]; then
echo "Define resource in IBM.MCP class on node $NODE. result=$result1"
logger xCAT "Define resource in IBM.MCP class on node $NODE. result=$result1"
logger -t xCAT "Define resource in IBM.MCP class on node $NODE. result=$result1"
exit 1
fi
fi
@ -192,7 +192,7 @@ if [ $ADD -eq 1 ]; then
result=`mount $NFSSERVER:/install/postscripts /xcatmnt`
if [ $? -gt 0 ]; then
echo "Failed to mount:$result"
logger xCAT "Failed to mount $result"
logger -t xCAT "Failed to mount $result"
exit 1
fi
cp -p -R /xcatmnt/rmcmon /var/xcat/rmcmon 2>/dev/null
@ -223,12 +223,13 @@ else
result2=`/usr/bin/rmrsrc-api -s IBM.MCP::"NodeID=0x$MS_NODEID" 2>&1`
if [ $? -gt 0 ]; then
echo "Remove resource in IBM.MCP class on noderesult=$result2"
logger xCAT "Remove resource in IBM.MCP class on noderesult=$result2"
logger -t xCAT "Remove resource in IBM.MCP class on noderesult=$result2"
exit 1
fi
fi
echo "done"
logger -t xCAT "done"
exit 0;