2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Fix double logging of postscript output in /var/log/xcat/xcat.log

This commit is contained in:
Kilian Cavalotti 2017-02-24 13:05:40 -08:00
parent fc95d2e958
commit 0cda7b5d02

View File

@ -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