Exit code needs to be captured post nc output. Don't exec as cmd

This commit is contained in:
Prasanna Santhanam 2012-09-26 20:20:47 +05:30
parent fa63c30576
commit 0cb54e2486
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ if [[ $ostypeid == "" ]]; then
exit 2
fi
$(nc -z $MGMT_SVR 8096)
nc -z $MGMT_SVR 8096
if [[ $? -ne 0 ]]; then
echo "$MGMT_SVR doesn't have port 8096 open"
exit 2