add mojo->master fallback compatibility
authorDirk Koopman <djk@tobit.co.uk>
Tue, 21 Feb 2017 11:54:26 +0000 (11:54 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Tue, 21 Feb 2017 11:54:26 +0000 (11:54 +0000)
perl/DXCron.pm
perl/DXVars.pm.issue
perl/cluster.pl

index 70c8e6606515015731646ccc4a3e6490cb51c0ef..343ba88d7d33218863798c7874c8a2d37e75340b 100644 (file)
@@ -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__
index 3f05a7b639ca18da495e34ef1a87736fafdf572e..d2ce8cbab9edf90b83ec10526f97d96063adeda2 100644 (file)
@@ -1,4 +1,4 @@
-#
+# -*- perl -*-
 # The system variables - those indicated will need to be changed to suit your
 # circumstances (and callsign)
 #
index 3336d077482f0114d2558b8cc696dbbede4f612f..0db8e0bcb2e0d59354f276a41a5c2a21c098e333 100755 (executable)
 
 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