From: Dirk Koopman Date: Tue, 21 Feb 2017 11:54:26 +0000 (+0000) Subject: add mojo->master fallback compatibility X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=bb9f4159e5666e42d2082ffb2c729928da2fdfb7 add mojo->master fallback compatibility --- diff --git a/perl/DXCron.pm b/perl/DXCron.pm index 70c8e660..343ba88d 100644 --- a/perl/DXCron.pm +++ b/perl/DXCron.pm @@ -293,5 +293,9 @@ sub run_cmd dbg("cmd out: $_") if isdbg('cron'); } } + +# for fallback from mojo branch +sub spawn_cmd {goto &run_cmd}; + 1; __END__ diff --git a/perl/DXVars.pm.issue b/perl/DXVars.pm.issue index 3f05a7b6..d2ce8cba 100644 --- a/perl/DXVars.pm.issue +++ b/perl/DXVars.pm.issue @@ -1,4 +1,4 @@ -# +# -*- perl -*- # The system variables - those indicated will need to be changed to suit your # circumstances (and callsign) # diff --git a/perl/cluster.pl b/perl/cluster.pl index 3336d077..0db8e0bc 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -12,6 +12,11 @@ require 5.004; +package main; + +# set default paths, these should be overwritten by DXVars.pm +use vars qw($data $system $cmd $localcmd $userfn); + # make sure that modules are searched in the order local then perl BEGIN { umask 002; @@ -30,6 +35,11 @@ BEGIN { mkdir "$root/local_cmd", 0777 unless -d "$root/local_cmd"; + $data = "$root/data"; + $system = "$root/sys"; + $cmd = "$root/cmd"; + $localcmd = "$root/local_cmd"; + $userfn = "$data/users"; # try to create and lock a lockfile (this isn't atomic but # should do for now