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_ntp.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins-scripts/check_ntp.pl') diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl index f3f6f78b..918ad504 100755 --- a/plugins-scripts/check_ntp.pl +++ b/plugins-scripts/check_ntp.pl @@ -7,6 +7,8 @@ # be installed on the system, however since it's part of the ntp suite, you # should already have it installed. # +# $Id$ +# # Nothing clever done in this program - its a very simple bare basics hack to # get the job done. # @@ -45,19 +47,17 @@ # source. This happens while starting up and if contact # with master has been lost. # -BEGIN { - if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { - $runtimedir = $1; - $PROGNAME = $2; - } -} +# Modifed to run under Embedded Perl - patch from Douglas Warner +# + require 5.004; use POSIX; use strict; use Getopt::Long; use vars qw($opt_V $opt_h $opt_H $opt_w $opt_c $verbose $PROGNAME); -use lib $main::runtimedir; +use FindBin; +use lib "$FindBin::Bin"; use utils qw($TIMEOUT %ERRORS &print_revision &support); sub print_help (); -- cgit v1.2.3