[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_disk_smb.pl,1.9,1.10

Ton Voon tonvoon at users.sourceforge.net
Mon Sep 15 07:27:10 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv9357

Modified Files:
	check_disk_smb.pl 
Log Message:
Optionally specify port for smbclient to use (781227 - Jason Burnett)


Index: check_disk_smb.pl
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_disk_smb.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_disk_smb.pl	2 Jul 2003 15:57:29 -0000	1.9
--- check_disk_smb.pl	15 Sep 2003 14:26:54 -0000	1.10
***************
*** 24,28 ****
  use strict;
  use Getopt::Long;
! use vars qw($opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
  use vars qw($PROGNAME);
  use lib utils.pm ;
--- 24,28 ----
  use strict;
  use Getopt::Long;
! use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
  use vars qw($PROGNAME);
  use lib utils.pm ;
***************
*** 41,44 ****
--- 41,45 ----
  GetOptions
  	("v"   => \$verbose, "verbose"    => \$verbose,
+ 	 "P=s" => \$opt_P, "port=s"     => \$opt_P,
  	 "V"   => \$opt_V, "version"    => \$opt_V,
  	 "h"   => \$opt_h, "help"       => \$opt_h,
***************
*** 59,63 ****
  
  my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;
! my $smbclientoptions="";
  
  
--- 60,64 ----
  
  my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;
! my $smbclientoptions= $opt_P ? "-p $opt_P " : "";
  
  
***************
*** 231,235 ****
  sub print_usage () {
  	print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password> 
!       -w <warn> -c <crit> [-W <workgroup>]\n";
  }
  
--- 232,236 ----
  sub print_usage () {
  	print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password> 
!       -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n";
  }
  
***************
*** 258,261 ****
--- 259,264 ----
  -c, --critical=INTEGER or INTEGER[kMG]
     Percent of used space at which a critical will be generated (Defaults: 95%)
+ -P, --port=INTEGER
+    Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default)
     
     If thresholds are followed by either a k, M, or G then check to see if that





More information about the Commits mailing list