summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_mssql.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_mssql.pl')
-rwxr-xr-xplugins-scripts/check_mssql.pl5
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;
31use Getopt::Long; 31use Getopt::Long;
32use FindBin; 32use FindBin;
33use lib "$FindBin::Bin"; 33use lib "$FindBin::Bin";
34use lib '@libexecdir@';
35use utils qw($TIMEOUT %ERRORS &print_revision &support); 34use utils qw($TIMEOUT %ERRORS &print_revision &support);
36use strict; 35use 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};
58alarm($TIMEOUT); 57alarm($timeout);
59 58
60unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) { 59unless ($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);