[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_disk_smb.pl,1.2,1.3

Subhendu Ghosh sghosh at users.sourceforge.net
Sun May 26 18:56:02 CEST 2002


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory usw-pr-cvs1:/tmp/cvs-serv19789

Modified Files:
	check_disk_smb.pl 
Log Message:
ePN fix and support for utils.pm

Index: check_disk_smb.pl
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_disk_smb.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** check_disk_smb.pl	2 May 2002 16:43:29 -0000	1.2
--- check_disk_smb.pl	27 May 2002 01:55:41 -0000	1.3
***************
*** 1,3 ****
! #! /usr/bin/perl -wT
  #
  #
--- 1,3 ----
! #! /usr/bin/perl -w
  #
  #
***************
*** 26,31 ****
  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 FindBin;
! use lib "$FindBin::Bin";
  use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
  
--- 26,30 ----
  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 ;
  use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
  
***************
*** 33,36 ****
--- 32,37 ----
  sub print_usage ();
  
+ $PROGNAME = "check_disk_smb";
+ 
  $ENV{'PATH'}='';
  $ENV{'BASH_ENV'}=''; 
***************
*** 57,63 ****
  if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
  
! my $smbclient="/usr/bin/smbclient";
  my $smbclientoptions="";
  
  ($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
  my $host = $1 if ($opt_H =~ /([-_.A-Za-z0-9]+)/);
--- 58,65 ----
  if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
  
! my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;
  my $smbclientoptions="";
  
+ 
  ($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
  my $host = $1 if ($opt_H =~ /([-_.A-Za-z0-9]+)/);
***************
*** 102,105 ****
--- 104,108 ----
  	$res = qx/$smbclient \/\/$host\/$share $pass -W $workgroup -U $user $smbclientoptions -c ls/;
  } else {
+ 	print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
  	$res = qx/$smbclient \/\/$host\/$share $pass -U $user $smbclientoptions -c ls/;
  }





More information about the Commits mailing list