projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not insist on being started as root, but use sudo to call megarc
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-raid-mpt
diff --git
a/dsa-nagios-checks/checks/dsa-check-raid-mpt
b/dsa-nagios-checks/checks/dsa-check-raid-mpt
index
0eb948f
..
3599c5e
100755
(executable)
--- 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'};
$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;
# nagios exit codes
my $UNKNOWN = -1;
@@
-32,7
+32,7
@@
unless (-e $MPT_STATUS) {
exit $UNKNOWN;
};
exit $UNKNOWN;
};
-my $command = "$MPT_STATUS -s";
+my $command = "
sudo
$MPT_STATUS -s";
open (MPT, "$command|") or die ("Cannot run $command: $!\n");
my @tw=<MPT>;
close MPT;
open (MPT, "$command|") or die ("Cannot run $command: $!\n");
my @tw=<MPT>;
close MPT;