Random Project

Option-d does not accept the value 0

I found a small bug in the script, the option-d does not accept the value 0, on certain occasions the slot has assigned that ID.

Error:
[]$ sudo perl /usr/local/nagios/libexec/check_hparray.pl -d 0
ERROR Missing controller slot number – did you pass anything to -d?

Fix:
I changed the line 56.

Before the change:
if(! $opt_controller)

After the change:
if(!defined($opt_controller))