Code

Make check_disk_smb accept spaces in share names (#990948, #1370031, Debian #601699)
[nagiosplug.git] / plugins-scripts / check_disk_smb.pl
index 7c81fc263a82f220e65cffe4b0bbf30fa88246bd..46987006647d452256b5b7e131924e4d821ed802 100755 (executable)
@@ -67,7 +67,7 @@ my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 ($host) || usage("Invalid host: $opt_H\n");
 
 ($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n");
-my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
+my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 ($share) || usage("Invalid share: $opt_s\n");
 
 defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");