From 977f88c293775638c7d9db258904939ca3f73a2f Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 30 Oct 2015 02:03:46 -0400 Subject: [PATCH 1/2] fix issue #97 [fvt]2.11:still could not get l full debuginfo in management node for diskless provision after xcatdebugmode=1 --- xCAT-server/share/xcat/install/scripts/post.ubuntu | 8 ++++---- xCAT-server/share/xcat/install/scripts/post.xcat | 8 ++++---- xCAT/postscripts/xcatdsklspost | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) 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..976dd10db 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 From 11b3c7d2ec262d1849d18817287e5043854763fd Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 5 Nov 2015 00:17:54 -0500 Subject: [PATCH 2/2] correct a typo --- xCAT-server/share/xcat/install/scripts/post.xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 976dd10db..dd4e1c0fd 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -150,7 +150,7 @@ run_ps () { bash -x ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} else - ./\$@ 2>&1 | tee -a \$logfile | | logger -t xcat -p debug + ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} fi else