Code

indicate new default state in get_rpcinfo, also fix a bunch of indents for consistent...
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Sun, 19 Jan 2003 06:34:59 +0000 (06:34 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Sun, 19 Jan 2003 06:34:59 +0000 (06:34 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@252 f882894a-f735-0410-b71e-b25c423dba1c

plugins-scripts/check_rpc.pl

index b9ca2799a8619e7d57e13b5eb8899d20d7a08d3d..783fa4703d204e585a1c0b890714e1a0ce38cbe1 100755 (executable)
@@ -51,16 +51,16 @@ $proto[10007]='u';
 use Getopt::Long;
 Getopt::Long::Configure('bundling');
 GetOptions(
-       "V"   => \$opt_V, "version"    => \$opt_V,
-          "h"   => \$opt_h, "help"       => \$opt_h,
-          "C=s" => \$opt_C, "command=s"  => \$opt_C,
-          "p=i" => \$opt_p, "port=i"     => \$opt_p,
-          "H=s" => \$opt_H, "hostname=s" => \$opt_H,
-          "c=s" => \$opt_c, "progver=s"  => \$opt_c,
-          "v+"   => \$verbose, "verbose+"  => \$verbose,
-          "u"   => \$opt_u,  "udp"       => \$opt_u,
-          "t"   => \$opt_t,  "tcp"       => \$opt_t
-          );
+       "V"   => \$opt_V,   "version"    => \$opt_V,
+       "h"   => \$opt_h,   "help"       => \$opt_h,
+       "C=s" => \$opt_C,   "command=s"  => \$opt_C,
+       "p=i" => \$opt_p,   "port=i"     => \$opt_p,
+       "H=s" => \$opt_H,   "hostname=s" => \$opt_H,
+       "c=s" => \$opt_c,   "progver=s"  => \$opt_c,
+       "v+"  => \$verbose, "verbose+"   => \$verbose,
+       "u"   => \$opt_u,   "udp"        => \$opt_u,
+       "t"   => \$opt_t,   "tcp"        => \$opt_t
+);
 
 # -h means display verbose help screen
 if ($opt_h) { print_help(); exit $ERRORS{'OK'}; }
@@ -313,7 +313,7 @@ sub get_rpcinfo {
        
        if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) {
                        $response .= " version $1";
-                       $state = 'OK' unless $state ne 'OK';
+                       $state = 'OK' unless $state ne 'UNKNOWN';
                        print "1:$response \n" if $verbose;
        }