Index: tools/batch-cmd
===================================================================
--- tools/batch-cmd	(revision 10660)
+++ tools/batch-cmd	(revision 10661)
@@ -11,4 +11,6 @@
 
 echo "# WARN: Going to run at: " $HOSTS; sleep 2
+scp_files=""
+concurrent=true
 
 ##
@@ -50,6 +52,7 @@
 
 ##
-## Sync lvrouted and wl-config files
+## Sync some files
 ##
+#scp_files="/tmp/wl-config /tmp/nameserver-shuffle"
 #cat <<'EOF' > /tmp/command
 #mount -uwo noatime / || exit 1
@@ -58,8 +61,9 @@
 #
 #cp -v /tmp/wl-config /tools || exit 1
-#cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1
-#cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1
+#cp -v /tmp/nameserver-shuffle /tools || exit 1
 #
-#/usr/local/etc/rc.d/lvrouted rcvar
+#mount -ur / || exit 1
+#/tools/wl-config -b || exit 1
+#/tools/nameserver-shuffle || exit 1
 #EOF
 
@@ -68,8 +72,9 @@
 ## config generator server
 ##
-#cat <<'EOF' > /tmp/command
-##sleep `expr $$ % 120`
-#/tools/wl-config -b
-#EOF
+cat <<'EOF' > /tmp/command
+sleep `expr $$ % 300`
+/tools/wl-config -b || exit 1
+/tools/nameserver-shuffle || exit 1
+EOF
 
 ##
@@ -82,7 +87,7 @@
 ##   for F in ip-*.txt; do printf "%-20s : %s\n" `echo "$F" | awk -F'[-.]' '{print $2}'` `grep -v '*' $F | tail -1 | awk '{print $2}'`; done | awk '{print $3}' | sed 's/^2[a-z0-9-]*\.//g' | sort | uniq -c
 ##
-cat << 'EOF' > /tmp/command
-traceroute -m 15 -w 1 -q 1 -I rvdzwet.nl
-EOF
+#cat << 'EOF' > /tmp/command
+#traceroute -m 15 -w 1 -q 1 -I rvdzwet.nl
+#EOF
 
 
@@ -96,8 +101,17 @@
   : > $stdout_file
   : > $stderr_file
-  {
-    #scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp || exit 1
+  if $concurrent; then
+    {
+      if [ -n "$scp_files" ]; then
+         scp -o ConnectTimeout=3 -o BatchMode=yes $scp_files root@$HOST:/tmp || exit 1
+      fi
+      cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command'
+    } 1>$stdout_file 2>$stderr_file &
+  else
+    if [ -n "$scp_files" ]; then
+       scp -o ConnectTimeout=3 -o BatchMode=yes $scp_files root@$HOST:/tmp || exit 1
+    fi
     cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command'
-  } 1>$stdout_file 2>$stderr_file &
+  fi
 done
 
