From 128e02db21dd7798a674c59bda460181cd769ccd Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 15 Sep 2014 05:27:27 -0700 Subject: [PATCH] jobd.pl/taskd.pl: find Girocco directory without needing perl -I Add a suitable "use lib ..." so that both jobd.pl and taskd.pl can find the Girocco directory for subsequent use statements without needing to be run via perl with a -I option. --- jobd/jobd.pl | 2 ++ taskd/taskd.pl | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/jobd/jobd.pl b/jobd/jobd.pl index dcd7947..273a1dc 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -10,7 +10,9 @@ use warnings; use Getopt::Long; use Pod::Usage; use POSIX ":sys_wait_h"; +use File::Basename; +use lib dirname($0); use Girocco::Config; use Girocco::Project; use Girocco::User; diff --git a/taskd/taskd.pl b/taskd/taskd.pl index f06dc81..4fc378a 100755 --- a/taskd/taskd.pl +++ b/taskd/taskd.pl @@ -30,12 +30,16 @@ use strict; use warnings; +use Socket; +use Errno; +use POSIX ":sys_wait_h"; +use File::Basename; + +use lib dirname($0); use Girocco::Config; use Girocco::Notify; use Girocco::Project; use Girocco::User; -use Socket; -use Errno; $| = 1; @@ -50,8 +54,6 @@ bind(Server, $uaddr) or die "bind: $!"; listen(Server, SOMAXCONN) or die "listen: $!"; chmod 0666, $NAME or die "chmod: $!"; - -use POSIX ":sys_wait_h"; sub REAPER { local $!; my $child; -- 2.11.4.GIT