adjust the log code for run_ps
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5740 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
50b323ae67
commit
2ca089af3a
@ -264,15 +264,13 @@ run_ps () {
|
||||
logfile=\\"/var/log/xcat/xcat.log\\"
|
||||
|
||||
if [[ -f \\\$1 ]]; then
|
||||
echo \\"Running postscript: \\\$1\\"
|
||||
echo \\"Running postscript: \\\$1\\" | tee -a \\\$logfile
|
||||
OUTPUT=\\\`./\\\$1 2>&1\\\`
|
||||
if [[ -n \\\$OUTPUT ]]; then
|
||||
echo \\"\\\$OUTPUT\\"
|
||||
echo \\"Postscript \\\$1: \\\$OUTPUT\\" >> \\\$logfile
|
||||
echo \\"\\\$OUTPUT\\" | tee -a \\\$logfile
|
||||
fi
|
||||
else
|
||||
echo \\"Postscript \\\$1 does NOT exist.\\"
|
||||
echo \\"Postscript \\\$1 does NOT exist.\\" >> \\\$logfile
|
||||
echo \\"Postscript \\\$1 does NOT exist.\\" | tee -a \\\$logfile
|
||||
fi
|
||||
}
|
||||
# subroutine end
|
||||
|
@ -314,15 +314,13 @@ run_ps () {
|
||||
logfile=\"var/log/xcat/xcat.log\"
|
||||
|
||||
if [[ -f \$1 ]]; then
|
||||
echo \"Running postscript: \$1\"
|
||||
echo \"Running postscript: \$1\" | tee -a \$logfile
|
||||
OUTPUT=\`./\$1 2>&1\`
|
||||
if [[ -n \$OUTPUT ]]; then
|
||||
echo \"\$OUTPUT\"
|
||||
echo \"Postscript \$1: $OUTPUT\"\ >> \$logfile
|
||||
echo \"\$OUTPUT\" | tee -a \$logfile
|
||||
fi
|
||||
else
|
||||
echo \"Postscript \$1 does NOT exist.\"
|
||||
echo \"Postscript \$1 does NOT exist.\" >> \$logfile
|
||||
echo \"Postscript \$1 does NOT exist.\" | tee -a \$logfile
|
||||
fi
|
||||
}
|
||||
# subroutine end
|
||||
|
Loading…
Reference in New Issue
Block a user