From becc0f34e60500798bd15bf5af6e4b8c52707d0a Mon Sep 17 00:00:00 2001 From: Subhendu Ghosh Date: Thu, 2 May 2002 16:43:29 +0000 Subject: fix for embedded perl git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@21 f882894a-f735-0410-b71e-b25c423dba1c --- plugins-scripts/check_disk_smb.pl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins-scripts/check_disk_smb.pl') diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index d1b0b3d6..9a66ed5d 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl @@ -14,13 +14,10 @@ # Modified [warn] and [critical] parameters to accept format of nnn[M|G] to # allow setting of limits in MBytes or GBytes. Percentage settings for large # drives is a pain in the butt - -BEGIN { - if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { - $runtimedir = $1; - $PROGNAME = $2; - } -} +# 2-May-2002 - SGhosh fix for embedded perl +# +# $Id$ +# require 5.004; use POSIX; @@ -28,7 +25,8 @@ use strict; use Getopt::Long; 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 $main::runtimedir; +use FindBin; +use lib "$FindBin::Bin"; use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); sub print_help (); -- cgit v1.2.3-74-g34f1