adjust the code for run_ps and setbootfromnet

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5750 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wuzhy 2010-04-13 03:48:29 +00:00
parent 4d91b4be21
commit d8021e73fb
3 changed files with 9 additions and 9 deletions

View File

@ -33,26 +33,26 @@ if [ ! -z $NODE_NAME ]; then
else
msg="$0: The environment variable NODE is null, pls check.\n"
echo $msg
`logger -t xcat "$msg"`
logger -t xcat "$msg"
exit 1
fi
if [[ $RET -ne 0 ]] || [[ $NRET -ne 0 ]]; then
msg="$0: The returned value is not correct, client_ip=$client_ip, nic=$nic\n"
`logger -t xcat "$msg"`
logger -t xcat "$msg"
exit 1
fi
if [ ! -z $NIC ]; then
if [[ ! -z $CLIENT_IP ]] && [[ ! -z $SERVER_IP ]] && [[ ! -z $GATE_WAY ]]; then
`bootlist -m normal $NIC bserver=$SERVER_IP gateway=$GATE_WAY client=$CLIENT_IP`
bootlist -m normal $NIC bserver=$SERVER_IP gateway=$GATE_WAY client=$CLIENT_IP
else
`bootlist -m normal $NIC`
bootlist -m normal $NIC
fi
else
msg="$0: The network interface NIC on the host $CLIENT_IP is not retrieved, pls check.\n"
echo $msg
`logger -t xcat "$msg"`
logger -t xcat "$msg"
exit 1
fi

View File

@ -260,12 +260,12 @@ if (-f $scriptname)
# subroutine used to run postscripts
run_ps () {
logdir=\\"/var/log/xcat\\"
\\\`mkdir -p \\\$logdir\\\`
mkdir -p \\\$logdir
logfile=\\"/var/log/xcat/xcat.log\\"
if [[ -f \\\$1 ]]; then
echo \\"Running postscript: \\\$1\\" | tee -a \\\$logfile
\\\`./\\\$1 2>&1\\\` | tee -a \\\$logfile
./\\\$1 2>&1 | tee -a \\\$logfile
else
echo \\"Postscript \\\$1 does NOT exist.\\" | tee -a \\\$logfile
fi

View File

@ -310,12 +310,12 @@ echo "
# subroutine used to run postscripts
run_ps () {
logdir=\"var/log/xcat\"
\`mkdir -p \$logdir\`
mkdir -p \$logdir
logfile=\"var/log/xcat/xcat.log\"
if [[ -f \$1 ]]; then
echo \"Running postscript: \$1\" | tee -a \$logfile
\`./\$1 2>&1\` | tee -a \$logfile
./\$1 2>&1 | tee -a \$logfile
else
echo \"Postscript \$1 does NOT exist.\" | tee -a \$logfile
fi