Commit 7b143c49 authored by Fulvio Galeazzi's avatar Fulvio Galeazzi
Browse files

2018-02-28: FG; Forgot to output value when exiting.

parent e5211790
......@@ -19,7 +19,7 @@ version="0.1"
getopt --test > /dev/null
if [[ $? != 4 ]]; then
echo "`getopt --test` failed in this environment."
exit 1
exit 11
fi
# Help function
......@@ -135,7 +135,7 @@ WANTOBJECTS="Storage,RAID,Disk"
SHORT=vhep:m:r:w:i:z:s:q:c:k:dt
LONG=version,help,check,path:,match:,raid:,want:,interval:,zabbixserver:,sender:,zabbixport:,zabbixsource:,timeout:,config:,debug,dumpconfig,test
PARSED=`getopt --options $SHORT --longoptions $LONG --name "$0" -- "$@"`
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 10 ; fi
eval set -- "$PARSED"
while true; do
......@@ -267,6 +267,7 @@ if [[ -z "$RAIDCTRLLIST" ]]; then
rm $KNOWNARRAYS
else
echo "\"$ZABBIXSOURCE\" \"custom.dellmd38xx.device.failed[${raidNameThis}]\" 2" >> $SENDERFILE
echo 2
fi
raidList="$raidCtrlThis"
else
......@@ -325,6 +326,7 @@ if [[ $RET_VAL = 0 ]]; then
done < $STATUSFILE
else
echo "\"$ZABBIXSOURCE\" \"custom.dellmd38xx.device.failed[${raidNameThis}]\" 1" >> $SENDERFILE
echo 1
fi
# Send all information to Zabbix using zbbix_sender
......@@ -385,3 +387,5 @@ rm -f $SENDERFILE
if [[ -n $tmpCONFIGFILE ]]; then
rm -f $CONFIGFILE
fi
echo 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment