From 8a0f0fc3c54895f0ce8b0207e42af1f693d757f6 Mon Sep 17 00:00:00 2001 From: djk Date: Sat, 28 Nov 1998 00:28:38 +0000 Subject: [PATCH] added connect, ping and rcmd --- cmd/connect.pl | 24 ++++++++++++++++++++++++ cmd/ping.pl | 0 cmd/rcmd.pl | 0 3 files changed, 24 insertions(+) create mode 100644 cmd/connect.pl create mode 100644 cmd/ping.pl create mode 100644 cmd/rcmd.pl 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 -- 2.43.0