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