From: Stephen Gran Date: Tue, 1 Dec 2009 01:45:50 +0000 (+0000) Subject: run only hpasmcli under sudo, more output cleanup X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=56be3215bceb62c332964c2e53193fb702077563;p=mirror%2Fdsa-nagios.git run only hpasmcli under sudo, more output cleanup Signed-off-by: Stephen Gran --- diff --git a/dsa-nagios-checks/checks/dsa-check-hpasm b/dsa-nagios-checks/checks/dsa-check-hpasm index 749b6d2..1f6550c 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpasm +++ b/dsa-nagios-checks/checks/dsa-check-hpasm @@ -83,7 +83,7 @@ sub do_dimm { } if ($return eq '') { - return "All DIMMS OK ($num_dimms) "; + return "DIMMS OK ($num_dimms) "; } else { return $return; } @@ -236,7 +236,7 @@ sub do_temp { } } -my @output = `echo "$command"|hpasmcli 2>&1`; +my @output = `echo "$command"|sudo hpasmcli 2>&1`; if (($? >> 8) != 0) { print "UNKNOWN: Can't exec hpasmcli: @output\n"; exit 3;