projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a line to bump the build no up
[spider.git]
/
perl
/
lock_nodes.pl
diff --git
a/perl/lock_nodes.pl
b/perl/lock_nodes.pl
index 4763fb1282666913a44ba01d54d1e5678dac90b6..2443e48b5353d96c4981714cc5daf59fa57684cd 100755
(executable)
--- a/
perl/lock_nodes.pl
+++ b/
perl/lock_nodes.pl
@@
-1,13
+1,9
@@
-#!/usr/bin/perl
+#!/usr/bin/
env
perl
#
#
-# remove all records with the sysop/cluster callsign and recreate
-# it from the information contained in DXVars
+# Lock all non local nodes that have a privileges <= 1
#
# WARNING - this must be run when the cluster.pl is down!
#
#
# WARNING - this must be run when the cluster.pl is down!
#
-# This WILL NOT delete an old sysop call if you are simply
-# changing the callsign.
-#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
#
@@
-19,14
+15,15
@@
BEGIN {
# root of directory tree for this system
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
# root of directory tree for this system
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
-
unshift @INC, "$root/perl"; # this IS the right way round!
+ unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
}
unshift @INC, "$root/local";
}
-use
DXVars
;
+use
SysVar
;
use DXUser;
use DXUser;
+use DXUtil;
-my $lockfn = "$root/local/cluster.lck"; # lock file name
+$lockfn = "$main::local_data/cluster.lck"; # lock file name (now in local d
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;
@@
-37,7
+34,7
@@
if (-e $lockfn) {
my @nodes = map { uc } @ARGV;
my @nodes = map { uc } @ARGV;
-DXUser
->init($userfn,
1);
+DXUser
::init(
1);
my $count;
my $nodes;
my $count;
my $nodes;
@@
-71,6
+68,6
@@
print "If there are any nodes missing on the above list then you MUST do\n";
print "a set/node (set/spider, set/clx etc) on each of them to allow them\n";
print "to connect to you or you to them\n";
print "a set/node (set/spider, set/clx etc) on each of them to allow them\n";
print "to connect to you or you to them\n";
-DXUser
->
finish();
+DXUser
::
finish();
exit(0);
exit(0);