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

check the postscripts before running it with 'bash -x' upgrade

This commit is contained in:
penguhyang 2015-10-19 05:07:42 -04:00
parent c48d5a1a94
commit e0fab6d9c4
3 changed files with 9 additions and 0 deletions

View File

@ -164,6 +164,9 @@ run_ps () {
if [[ \"\$compt\" =~ \$reg ]]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
else
./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
fi
else
./\$@ 2>&1 | tee -a \$logfile

View File

@ -149,6 +149,9 @@ run_ps () {
if [[ \"\$compt\" =~ \$reg ]]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
else
./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
fi
else
./\$@ 2>&1 | tee -a \$logfile

View File

@ -834,6 +834,9 @@ run_ps () {
if [[ \"\$compt\" =~ \$reg ]]; then
bash -x ./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
else
./\$@ 2>&1 | tee -a \$logfile
ret_local=\${PIPESTATUS[0]}
fi
else
./\$@ 2>&1 | tee -a \$logfile