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:
wuzhy 2010-04-12 09:22:55 +00:00
parent 50b323ae67
commit 2ca089af3a
2 changed files with 6 additions and 10 deletions

View File

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

View File

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