From 0cda7b5d02fde841fe3144d5683b6f072c84214f Mon Sep 17 00:00:00 2001 From: Kilian Cavalotti Date: Fri, 24 Feb 2017 13:05:40 -0800 Subject: [PATCH] Fix double logging of postscript output in /var/log/xcat/xcat.log --- xCAT-server/share/xcat/install/scripts/post.xcat | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 2d6cffec7..2179b2f82 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -202,7 +202,6 @@ run_ps () { fi if [ -f \$1 ]; then - echo \"\`date\` Running \$scriptype: \$1\" msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` Running \$scriptype: \$1\"" \"\$logfile\" if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then local compt=\$(file \$1) @@ -211,21 +210,19 @@ run_ps () { bash -x ./\$@ 2>&1 ret_local=\$? else - ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug + ./\$@ 2>&1 | logger -t xcat -p debug ret_local=\${PIPESTATUS[0]} fi else - ./\$@ 2>&1 | tee -a \$logfile + ./\$@ 2>&1 ret_local=\${PIPESTATUS[0]} fi if [ \"\$ret_local\" -ne \"0\" ]; then return_value=\$ret_local fi - echo \"\$scriptype: \$1 exited with code \$ret_local\" msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` \$scriptype \$1 return with \$ret_local\"" \"\$logfile\" else - echo \"\`date\` \$scriptype \$1 does NOT exist.\" msgutil_r \"\$MASTER_IP\" \"info\" "\"\`date\` \$scriptype \$1 does NOT exist.\"" \"\$logfile\" return_value=-1 fi