summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/tools/onnode.ssh
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster/ctdb/tools/onnode.ssh')
-rwxr-xr-xsource4/cluster/ctdb/tools/onnode.ssh43
1 files changed, 0 insertions, 43 deletions
diff --git a/source4/cluster/ctdb/tools/onnode.ssh b/source4/cluster/ctdb/tools/onnode.ssh
deleted file mode 100755
index ec1231616e..0000000000
--- a/source4/cluster/ctdb/tools/onnode.ssh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# onnode script for ssh
-
-if [ $# -lt 2 ]; then
-cat <<EOF
-Usage: onnode <nodenum|all> <command>
-EOF
-exit 1
-fi
-
-NODE="$1"
-shift
-SCRIPT="$*"
-
-NODES=/etc/ctdb/nodes
-
-NUMNODES=`egrep '^[[:alnum:]]' $NODES | wc -l`
-MAXNODE=`expr $NUMNODES - 1`
-
-if [ $NODE = "all" ]; then
- for a in `egrep '^[[:alnum:]]' $NODES`; do
- if [ -f "$SCRIPT" ]; then
- ssh $a at -f $SCRIPT now
- else
- ssh $a $SCRIPT
- fi
- done
- exit 0
-fi
-
-if [ $NODE -gt $MAXNODE ]; then
- echo "Node $NODE doesn't exist"
- exit 1
-fi
-
-NODEPLUSONE=`expr $NODE + 1`
-a=`egrep '^[[:alnum:]]' $NODES | head -$NODEPLUSONE | tail -1`
-
-if [ -f "$SCRIPT" ]; then
- exec ssh $a at -f $SCRIPT now
-else
- exec ssh $a $SCRIPT
-fi