Fix default return code

This commit is contained in:
Guillaume Coré
2013-05-03 16:29:21 -04:00
parent 123a8e2b57
commit 40869fb2b4
+2 -1
View File
@@ -7,7 +7,6 @@ ST_OK=0
ST_WR=1 ST_WR=1
ST_CR=2 ST_CR=2
ST_UK=3 ST_UK=3
ST_FINAL=$ST_UK
print_version() { print_version() {
echo "$VERSION $AUTHOR" echo "$VERSION $AUTHOR"
@@ -135,6 +134,8 @@ elif [ $r1 -le $crit ]; then
elif [ $r1 -le $warn ]; then elif [ $r1 -le $warn ]; then
echo "WARNING: number of NODES = $r1" echo "WARNING: number of NODES = $r1"
ST_FINAL=${ST_FINAL-$ST_WR} ST_FINAL=${ST_FINAL-$ST_WR}
else
exit $ST_UK
fi fi
exit $ST_FINAL exit $ST_FINAL