diff options
Diffstat (limited to 'plugins-scripts/check_mssql.pl')
-rwxr-xr-x | plugins-scripts/check_mssql.pl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl index 1f38788..bf3a651 100755 --- a/plugins-scripts/check_mssql.pl +++ b/plugins-scripts/check_mssql.pl | |||
@@ -31,7 +31,6 @@ use DBD::Sybase; | |||
31 | use Getopt::Long; | 31 | use Getopt::Long; |
32 | use FindBin; | 32 | use FindBin; |
33 | use lib "$FindBin::Bin"; | 33 | use lib "$FindBin::Bin"; |
34 | use lib '@libexecdir@'; | ||
35 | use utils qw($TIMEOUT %ERRORS &print_revision &support); | 34 | use utils qw($TIMEOUT %ERRORS &print_revision &support); |
36 | use strict; | 35 | use strict; |
37 | 36 | ||
@@ -55,7 +54,7 @@ $SIG{'ALRM'} = sub { | |||
55 | print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n"); | 54 | print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n"); |
56 | exit $ERRORS{"UNKNOWN"}; | 55 | exit $ERRORS{"UNKNOWN"}; |
57 | }; | 56 | }; |
58 | alarm($TIMEOUT); | 57 | alarm($timeout); |
59 | 58 | ||
60 | unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) { | 59 | unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) { |
61 | printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n"; | 60 | printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n"; |
@@ -131,7 +130,7 @@ sub process_arguments { | |||
131 | 130 | ||
132 | if (defined $opt_V) { | 131 | if (defined $opt_V) { |
133 | print_revision($PROGNAME,'@NP_VERSION@'); | 132 | print_revision($PROGNAME,'@NP_VERSION@'); |
134 | exit $ERRORS{'OK'}; | 133 | exit $ERRORS{'UNKNOWN'}; |
135 | } | 134 | } |
136 | 135 | ||
137 | syntax("Help:") if ($help); | 136 | syntax("Help:") if ($help); |