From: djk Date: Sat, 28 Nov 1998 00:28:38 +0000 (+0000) Subject: added connect, ping and rcmd X-Git-Tag: SPIDER_1_5~10 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a0f0fc3c54895f0ce8b0207e42af1f693d757f6;p=spider.git added connect, ping and rcmd --- diff --git a/cmd/connect.pl b/cmd/connect.pl new file mode 100644 index 00000000..7fb3b7f4 --- /dev/null +++ b/cmd/connect.pl @@ -0,0 +1,24 @@ +# +# connect a cluster station +# +my $self = shift; +my $call = uc shift; +return (0) if $self->priv < 9; +return (1, $self->msg('already', $call)) if DXChannel::get($call); + +my $prog = "$main::root/local/client.pl"; +$prog = "$main::root/perl/client.pl" if ! -e $prog; + +my $pid = fork(); +if (defined $pid) { + if (!$pid) { + # in child + exec $prog, $call, 'connect'; + } else { + return(1, $self->msg('constart', $call)); + } +} +return (0, $self->msg('confail', $call, $!)) + + + diff --git a/cmd/ping.pl b/cmd/ping.pl new file mode 100644 index 00000000..e69de29b diff --git a/cmd/rcmd.pl b/cmd/rcmd.pl new file mode 100644 index 00000000..e69de29b