diff options
Diffstat (limited to 'nagios-check-libs')
-rwxr-xr-x | nagios-check-libs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nagios-check-libs b/nagios-check-libs index 1ad3458..b041144 100755 --- a/nagios-check-libs +++ b/nagios-check-libs @@ -49,12 +49,13 @@ sub dief { if (!GetOptions ( '--help' => \$params->{'help'}, '--version' => \$params->{'version'}, + '--quiet' => \$params->{'quiet'}, '--verbose' => \$params->{'verbose'}, )) { - dief ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose]\n"); + dief ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet]\n"); }; if ($params->{'help'}) { - print "$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose]\n"; + print "$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet]\n"; print "Reports processes that are linked against libraries that no longer exist.\n"; exit (0); }; @@ -125,14 +126,14 @@ for my $line (@lsof) { -my $message; +my $message=''; my $exit = $OK; if (keys %processes) { $exit = $WARNING; - $message = 'The following processes have libs linked that were upgraded: '. getUsers(); + $message = 'The following processes have libs linked that were upgraded: '. getUsers()."\n"; } else { - $message = 'No upgraded libs linked in running processes'; + $message = "No upgraded libs linked in running processes\n" unless $params->{'quiet'}; }; -print $message,"\n"; +print $message; exit $exit; |