version 1.198, 2004/06/17 22:37:52
|
version 1.203, 2004/06/29 15:19:56
|
Line 354 sub ReadManagerTable {
|
Line 354 sub ReadManagerTable {
|
while(my $host = <MANAGERS>) { |
while(my $host = <MANAGERS>) { |
chomp($host); |
chomp($host); |
if ($host =~ "^#") { # Comment line. |
if ($host =~ "^#") { # Comment line. |
logthis('<font color="green"> Skipping line: '. "$host</font>\n"); |
|
next; |
next; |
} |
} |
if (!defined $hostip{$host}) { # This is a non cluster member |
if (!defined $hostip{$host}) { # This is a non cluster member |
Line 2836 sub make_new_child {
|
Line 2835 sub make_new_child {
|
my %hash; |
my %hash; |
if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_WRCREAT(),0640)) { |
if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_WRCREAT(),0640)) { |
foreach my $pair (@pairs) { |
foreach my $pair (@pairs) { |
my ($key,$value)=split(/=/,$pair); |
my ($key,$descr,$inst_code)=split(/=/,$pair); |
$hash{$key}=$value.':'.$now; |
$hash{$key}=$descr.':'.$inst_code.':'.$now; |
} |
} |
if (untie(%hash)) { |
if (untie(%hash)) { |
print $client "ok\n"; |
print $client "ok\n"; |
Line 2872 sub make_new_child {
|
Line 2871 sub make_new_child {
|
my %hash; |
my %hash; |
if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_READER(),0640)) { |
if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_READER(),0640)) { |
while (my ($key,$value) = each(%hash)) { |
while (my ($key,$value) = each(%hash)) { |
my ($descr,$lasttime)=split(/\:/,$value); |
my ($descr,$lasttime,$inst_code); |
|
if ($value =~ m/^([^\:]*):([^\:]*):(\d+)$/) { |
|
($descr,$inst_code,$lasttime)=($1,$2,$3); |
|
} else { |
|
($descr,$lasttime) = split(/\:/,$value); |
|
} |
if ($lasttime<$since) { next; } |
if ($lasttime<$since) { next; } |
if ($description eq '.') { |
if ($description eq '.') { |
$qresult.=$key.'='.$descr.'&'; |
$qresult.=$key.'='.$descr.':'.$inst_code.'&'; |
} else { |
} else { |
my $unescapeVal = &unescape($descr); |
my $unescapeVal = &unescape($descr); |
if (eval('$unescapeVal=~/\Q$description\E/i')) { |
if (eval('$unescapeVal=~/\Q$description\E/i')) { |
$qresult.="$key=$descr&"; |
$qresult.=$key.'='.$descr.':'.$inst_code.'&'; |
} |
} |
} |
} |
} |
} |
Line 3033 sub make_new_child {
|
Line 3037 sub make_new_child {
|
Reply($client, "refused\n", $userinput); |
Reply($client, "refused\n", $userinput); |
|
|
} |
} |
|
# ----------------------------------------- portfolio directory list (portls) |
|
} elsif ($userinput =~ /^portls/) { |
|
if(isClient) { |
|
my ($cmd,$uname,$udom)=split(/:/,$userinput); |
|
my $udir=propath($udom,$uname).'/userfiles/portfolio'; |
|
my $dirLine=''; |
|
my $dirContents=''; |
|
if (opendir(LSDIR,$udir.'/')){ |
|
while ($dirLine = readdir(LSDIR)){ |
|
$dirContents = $dirContents.$dirLine.'<br />'; |
|
} |
|
} else { |
|
$dirContents = "No directory found\n"; |
|
} |
|
print $client $dirContents."\n"; |
|
} else { |
|
Reply($client, "refused\n", $userinput); |
|
} |
# -------------------------------------------------------------------------- ls |
# -------------------------------------------------------------------------- ls |
} elsif ($userinput =~ /^ls/) { |
} elsif ($userinput =~ /^ls/) { |
if(isClient) { |
if(isClient) { |