1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 10_check_disk_smb_spaces.dpatch by
3
## Matthias Eble <psychotrahe@users.sourceforge.net>
5
## From 0892c4ac28c4c2e3b6275187f845813b4cd6d320 Mon Sep 17 00:00:00 2001
6
## From: Matthias Eble <psychotrahe@users.sourceforge.net>
7
## Date: Sun, 28 Nov 2010 21:35:59 +0100
8
## Subject: [PATCH] Make check_disk_smb accept spaces in share names
9
## (#990948, #1370031, Debian #601699)
11
## DP: Enables Support sharenames with spaces (http://bugs.debian.org/601699)
12
## DP: Upstream bug is: http://sourceforge.net/tracker/?func=detail&aid=990948&group_id=29880&atid=397597
16
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
17
index 7c81fc2..4698700 100755
18
--- a/plugins-scripts/check_disk_smb.pl
19
+++ b/plugins-scripts/check_disk_smb.pl
20
@@ -67,7 +67,7 @@ my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
21
($host) || usage("Invalid host: $opt_H\n");
23
($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n");
24
-my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
25
+my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
26
($share) || usage("Invalid share: $opt_s\n");
28
defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");