3 # Lock all non local nodes that have a privileges <= 1
5 # WARNING - this must be run when the cluster.pl is down!
7 # Copyright (c) 1998 Dirk Koopman G1TLH
12 # make sure that modules are searched in the order local then perl
15 # root of directory tree for this system
17 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
18 unshift @INC, "$root/perl"; # this IS the right way round!
19 unshift @INC, "$root/local";
26 $lockfn = "$main::local_data/cluster.lck"; # lock file name (now in local d
28 open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
31 die "Sorry, Lockfile ($lockfn) and process $pid exist, a cluster is running\n" if kill 0, $pid;
35 my @nodes = map { uc } @ARGV;
46 return $_[0] =~ m{"sort":"[ACRSX]"} ? $k : ();
49 foreach my $key (@calls) {
50 my $user = DXUser::get($key);
53 if (grep $key eq $_, (@nodes, $mycall)) {
57 my $priv = $user->priv;
62 $user->priv(1) unless $priv;
72 print "locked out $count nodes out of $nodes\n";
73 print scalar @ignore, " nodes ignored (", join(',', @ignore), ")\n";
74 print "If there are any nodes missing on the above list then you MUST do\n";
75 print "a set/node (set/spider, set/clx etc) on each of them to allow them\n";
76 print "to connect to you or you to them\n";