From: Peter Palfrader Date: Fri, 7 Aug 2009 10:21:28 +0000 (+0200) Subject: You'd think this wasn't that difficult. You'd be wrong, apparently. X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=inline;h=c619c9bcbab7411eeeccac4da6512c4bbdbbe671;hp=-c;p=mirror%2Fdsa-nagios.git You'd think this wasn't that difficult. You'd be wrong, apparently. --- c619c9bcbab7411eeeccac4da6512c4bbdbbe671 diff --git a/dsa-nagios-checks/checks/dsa-check-raid-mpt b/dsa-nagios-checks/checks/dsa-check-raid-mpt index 0eb948f..3599c5e 100755 --- a/dsa-nagios-checks/checks/dsa-check-raid-mpt +++ b/dsa-nagios-checks/checks/dsa-check-raid-mpt @@ -14,7 +14,7 @@ use Getopt::Long; $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; -my $MPT_STATUS = 'sudo /usr/sbin/mpt-status'; +my $MPT_STATUS = '/usr/sbin/mpt-status'; # nagios exit codes my $UNKNOWN = -1; @@ -32,7 +32,7 @@ unless (-e $MPT_STATUS) { exit $UNKNOWN; }; -my $command = "$MPT_STATUS -s"; +my $command = "sudo $MPT_STATUS -s"; open (MPT, "$command|") or die ("Cannot run $command: $!\n"); my @tw=; close MPT;