diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 26d062e8b..3a1325b68 100755 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -96,7 +96,7 @@ do msgutil_r "$MASTER_IP" "debug" "trying to get mypostscript with getpostscript.awk" "/var/log/xcat/xcat.log" fi /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript - MYCONT=`grep MASTER /xcatpost/mypostscript` + MYCONT=`grep ^MASTER= /xcatpost/mypostscript` MAX_RETRIES=10 RETRY=0 while [ -z "$MYCONT" ]; do @@ -109,7 +109,7 @@ do let SLI=$RANDOM%10+10 sleep $SLI /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript - MYCONT=`grep MASTER /xcatpost/mypostscript` + MYCONT=`grep ^MASTER= /xcatpost/mypostscript` done @@ -162,10 +162,10 @@ run_ps () { local compt=\$(file \$1) local reg=\"shell script\" if [[ \"\$compt\" =~ \$reg ]]; then - bash -x ./\$@ 2>&1 | tee -a \$logfile + bash -x ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} else - ./\$@ 2>&1 | tee -a \$logfile + ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} fi else diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 0ad6ce8e6..dd4e1c0fd 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -77,7 +77,7 @@ do /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript - MYCONT=`grep MASTER /xcatpost/mypostscript` + MYCONT=`grep ^MASTER= /xcatpost/mypostscript` MAX_RETRIES=10 RETRY=0 while [ -z "$MYCONT" ]; do @@ -91,7 +91,7 @@ do sleep $SLI /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript - MYCONT=`grep MASTER /xcatpost/mypostscript` + MYCONT=`grep ^MASTER= /xcatpost/mypostscript` done fi @@ -147,10 +147,10 @@ run_ps () { local compt=\$(file \$1) local reg=\"shell script\" if [[ \"\$compt\" =~ \$reg ]]; then - bash -x ./\$@ 2>&1 | tee -a \$logfile + bash -x ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} else - ./\$@ 2>&1 | tee -a \$logfile + ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} fi else diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index feec383a4..8fccf9460 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -832,10 +832,10 @@ run_ps () { local compt=\$(file \$1) local reg=\"shell script\" if [[ \"\$compt\" =~ \$reg ]]; then - bash -x ./\$@ 2>&1 | tee -a \$logfile + bash -x ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} else - ./\$@ 2>&1 | tee -a \$logfile + ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} fi else