diff options
Diffstat (limited to 'web/attachments/57488-check_disk_smb.patch')
-rw-r--r-- | web/attachments/57488-check_disk_smb.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/web/attachments/57488-check_disk_smb.patch b/web/attachments/57488-check_disk_smb.patch new file mode 100644 index 0000000..7883520 --- /dev/null +++ b/web/attachments/57488-check_disk_smb.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | --- ../check_disk_smb.pl 2003-07-02 10:57:29.000000000 -0500 | ||
2 | +++ check_disk_smb.pl 2003-07-31 20:06:13.000000000 -0500 | ||
3 | @@ -23,7 +23,7 @@ | ||
4 | use POSIX; | ||
5 | use strict; | ||
6 | use Getopt::Long; | ||
7 | -use vars qw($opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose); | ||
8 | +use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose); | ||
9 | use vars qw($PROGNAME); | ||
10 | use lib utils.pm ; | ||
11 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); | ||
12 | @@ -40,6 +40,7 @@ | ||
13 | Getopt::Long::Configure('bundling'); | ||
14 | GetOptions | ||
15 | ("v" => \$verbose, "verbose" => \$verbose, | ||
16 | + "P=s" => \$opt_P, "Port=s" => \$opt_P, | ||
17 | "V" => \$opt_V, "version" => \$opt_V, | ||
18 | "h" => \$opt_h, "help" => \$opt_h, | ||
19 | "w=s" => \$opt_w, "warning=s" => \$opt_w, | ||
20 | @@ -58,7 +59,7 @@ | ||
21 | if ($opt_h) {print_help(); exit $ERRORS{'OK'};} | ||
22 | |||
23 | my $smbclient= "$utils::PATH_TO_SMBCLIENT " ; | ||
24 | -my $smbclientoptions=""; | ||
25 | +my $smbclientoptions = $opt_P ? " -p $opt_P " : " "; | ||
26 | |||
27 | |||
28 | # Options checking | ||
29 | @@ -230,7 +231,7 @@ | ||
30 | |||
31 | sub print_usage () { | ||
32 | print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password> | ||
33 | - -w <warn> -c <crit> [-W <workgroup>]\n"; | ||
34 | + -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n"; | ||
35 | } | ||
36 | |||
37 | sub print_help () { | ||
38 | @@ -257,6 +258,8 @@ | ||
39 | |||
40 | -c, --critical=INTEGER or INTEGER[kMG] | ||
41 | Percent of used space at which a critical will be generated (Defaults: 95%) | ||
42 | +-P, --Port=Integer | ||
43 | + Port to be used to connect to. Some windows boxes use 139, others 445. (Default: none) | ||
44 | |||
45 | If thresholds are followed by either a k, M, or G then check to see if that | ||
46 | much disk space is available (kilobytes, Megabytes, Gigabytes) | ||