[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_disk_smb.pl,1.7,1.8

Karl DeBisschop kdebisschop at users.sourceforge.net
Wed Feb 19 19:17:10 CET 2003


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

Modified Files:
	check_disk_smb.pl 
Log Message:
option regexs need to include ^ and $ 

Index: check_disk_smb.pl
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_disk_smb.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_disk_smb.pl	16 Jan 2003 05:19:09 -0000	1.7
--- check_disk_smb.pl	20 Feb 2003 03:16:26 -0000	1.8
***************
*** 65,77 ****
  
  ($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
! my $host = $1 if ($opt_H =~ /([-_.A-Za-z0-9]+\$?)/);
  ($host) || usage("Invalid host: $opt_H\n");
  
  ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+\$?)/);
  ($share) || usage("Invalid share: $opt_s\n");
  
  ($opt_u) || ($opt_u = shift) || ($opt_u = "guest");
! my $user = $1 if ($opt_u =~ /([-_.A-Za-z0-9\\]+)/);
  ($user) || usage("Invalid user: $opt_u\n");
  
--- 65,77 ----
  
  ($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
! my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9]+\$?)$/);
  ($host) || usage("Invalid host: $opt_H\n");
  
  ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
! my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
  ($share) || usage("Invalid share: $opt_s\n");
  
  ($opt_u) || ($opt_u = shift) || ($opt_u = "guest");
! my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]+)$/);
  ($user) || usage("Invalid user: $opt_u\n");
  
***************
*** 80,88 ****
  
  ($opt_w) || ($opt_w = shift) || ($opt_w = 85);
! my $warn = $1 if ($opt_w =~ /([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])/);
  ($warn) || usage("Invalid warning threshold: $opt_w\n");
  
  ($opt_c) || ($opt_c = shift) || ($opt_c = 95);
! my $crit = $1 if ($opt_c =~ /([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])/);
  ($crit) || usage("Invalid critical threshold: $opt_c\n");
  
--- 80,88 ----
  
  ($opt_w) || ($opt_w = shift) || ($opt_w = 85);
! my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
  ($warn) || usage("Invalid warning threshold: $opt_w\n");
  
  ($opt_c) || ($opt_c = shift) || ($opt_c = 95);
! my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
  ($crit) || usage("Invalid critical threshold: $opt_c\n");
  





More information about the Commits mailing list