------------------------------------------------------------
revno: 747
revision-id:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge.stable
timestamp: Wed 2008-01-09 15:04:56 +1100
message:
  allow remote variable expansion in onnode, so you can use wildcards that 
expand on the remote nodes
modified:
  tools/onnode.rsh               onnode.rsh-20070530010004-83j66tszzvsimcn2-1
  tools/onnode.ssh               onnode.ssh-20070530010004-83j66tszzvsimcn2-3
=== modified file 'tools/onnode.rsh'
--- a/tools/onnode.rsh  2008-01-07 03:31:13 +0000
+++ b/tools/onnode.rsh  2008-01-09 04:04:56 +0000
@@ -10,7 +10,7 @@
 
 NODE="$1"
 shift
-SCRIPT="$*"
+SCRIPT="$@"
 
 NODES=/etc/ctdb/nodes
 
@@ -21,9 +21,9 @@
     for a in `egrep '^[[:alnum:]]' $NODES`; do
        echo; echo ">> NODE: $a <<"
        if [ -f "$SCRIPT" ]; then
-           rsh $a at -f $SCRIPT now
+           rsh $a at -f "$SCRIPT" now
        else
-           rsh $a $SCRIPT
+           rsh $a "$SCRIPT"
        fi
     done
     exit 0
@@ -38,7 +38,7 @@
 a=`egrep '^[[:alnum:]]' $NODES | head -$NODEPLUSONE | tail -1`
 
 if [ -f "$SCRIPT" ]; then
-    exec rsh $a at -f $SCRIPT now
+    exec rsh $a at -f "$SCRIPT" now
 else
-    exec rsh $a $SCRIPT
+    exec rsh $a "$SCRIPT"
 fi

=== modified file 'tools/onnode.ssh'
--- a/tools/onnode.ssh  2008-01-07 03:31:13 +0000
+++ b/tools/onnode.ssh  2008-01-09 04:04:56 +0000
@@ -10,7 +10,7 @@
 
 NODE="$1"
 shift
-SCRIPT="$*"
+SCRIPT="$@"
 
 NODES=/etc/ctdb/nodes
 
@@ -21,9 +21,9 @@
     for a in `egrep '^[[:alnum:]]' $NODES`; do
        echo; echo ">> NODE: $a <<"
        if [ -f "$SCRIPT" ]; then
-           ssh -n $a at -f $SCRIPT now
+           ssh -n $a at -f "$SCRIPT" now
        else
-           ssh -n $a $SCRIPT
+           ssh -n $a "$SCRIPT"
        fi
     done
     exit 0
@@ -38,7 +38,7 @@
 a=`egrep '^[[:alnum:]]' $NODES | head -$NODEPLUSONE | tail -1`
 
 if [ -f "$SCRIPT" ]; then
-    exec ssh -n $a at -f $SCRIPT now
+    exec ssh -n $a at -f "$SCRIPT" now
 else
-    exec ssh -n $a $SCRIPT
+    exec ssh -n $a "$SCRIPT"
 fi

Reply via email to