From a1d7bb8bef7b1b76dab0110e5fa1bf0347d9ed46 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 1 Jun 2012 08:08:06 +0000 Subject: [PATCH] fixed defect:Summary:change all logger calls to put xcat msgs into local4 - ID: 3513525 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12985 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-rmc/scripts/configrmcnode | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/xCAT-rmc/scripts/configrmcnode b/xCAT-rmc/scripts/configrmcnode index b1eb67795..ac500de95 100755 --- a/xCAT-rmc/scripts/configrmcnode +++ b/xCAT-rmc/scripts/configrmcnode @@ -22,18 +22,18 @@ if [ -z "$NODE" ]; then NODE=`hostname` fi -#logger xCAT "configrmcnode: ADD=$ADD, NODE=$NODE, NODEID=$NODEID MONMASTER=$MONMASTER,MS_NODEID=$MS_NODEID" +#logger -t xCAT -p local4.info "configrmcnode: ADD=$ADD, NODE=$NODE, NODEID=$NODEID MONMASTER=$MONMASTER,MS_NODEID=$MS_NODEID" #check if rsct is installed and running if [ ! -e /usr/bin/lsrsrc ]; then - logger -t xCAT "RMC setup on node $NODE: RSCT is not is not installed." + logger -t xCAT -p local4.err "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 -t xCAT "RMC deamon cannot be started on node $NODE:$result" + logger -t xCAT -p local4.err "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 -t xCAT "RMC subsystem has not started" + logger -t xCAT -p local4.err "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 -t xCAT "Reset nodeid: $result" + logger -t xCAT -p local4.info "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 -t xCAT "RMC setup on node $NODE: Cannot reconfig RSCT with new node id" + logger -t xCAT -p local4.warning "RMC setup on node $NODE: Cannot reconfig RSCT with new node id" fi fi fi @@ -115,7 +115,7 @@ if [ $ADD -eq 1 ]; then result=`/usr/sbin/rsct/bin/rmcctrl -s 2>&1`; if [ $? -gt 0 ]; then echo "RMC deamon cannot be started on node $NODE:$result" - logger xCAT "RMC deamon cannot be started on node $NODE:$result" + logger -t xCAT -p local4.err "RMC deamon cannot be started on node $NODE:$result" exit 1; fi fi @@ -142,7 +142,7 @@ if [ $ADD -eq 1 ]; then done if [[ $rc -ne 0 ]] then - logger -t xCAT "RMC subsystem has not started" + logger -t xCAT -p local4.err "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 -t xCAT "RMC setup on node $NODE:$result" + logger -t xCAT -p local4.info "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 -t xCAT "Define resource in IBM.MCP class on node $NODE. result=$result1" + logger -t xCAT -p local4.err "Define resource in IBM.MCP class on node $NODE. result=$result1" exit 1 fi fi @@ -209,7 +209,7 @@ if [ $ADD -eq 1 ]; then fi if [ $? -gt 0 ]; then echo "Failed to mount:$result" - logger -t xCAT "Failed to mount $result" + logger -t xCAT -p local4.err "Failed to mount $result" exit 1 fi mkdir -p /var/xcat/rmcmon/scripts @@ -236,7 +236,7 @@ else fi else echo "$result" - logger xCAT "$result" + logger -t xCAT -p local4.err "$result" exit 1 fi fi @@ -245,13 +245,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 -t xCAT "Remove resource in IBM.MCP class on noderesult=$result2" + logger -t xCAT -p local4.err "Remove resource in IBM.MCP class on noderesult=$result2" exit 1 fi fi echo "done" -logger -t xCAT "done" +logger -t xCAT -p local4.info "done" exit 0;