]> dxcluster.net Git - spider.git/commitdiff
added connect, ping and rcmd
authordjk <djk>
Sat, 28 Nov 1998 00:28:38 +0000 (00:28 +0000)
committerdjk <djk>
Sat, 28 Nov 1998 00:28:38 +0000 (00:28 +0000)
cmd/connect.pl [new file with mode: 0644]
cmd/ping.pl [new file with mode: 0644]
cmd/rcmd.pl [new file with mode: 0644]

diff --git a/cmd/connect.pl b/cmd/connect.pl
new file mode 100644 (file)
index 0000000..7fb3b7f
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/cmd/rcmd.pl b/cmd/rcmd.pl
new file mode 100644 (file)
index 0000000..e69de29