Index: /tools/batch-cmd
===================================================================
--- /tools/batch-cmd	(revision 10627)
+++ /tools/batch-cmd	(revision 10632)
@@ -12,14 +12,43 @@
 echo "# WARN: Going to run at: " $HOSTS; sleep 2
 
-cat << 'EOF' >/tmp/command
-sh -c ". /etc/rc.subr; load_rc_config "networking"; set" > /tmp/networking-env
-grep -e ^ifconfig -e ^ipv4 /tmp/networking-env
-{ grep -e ^ipv4 /tmp/networking-env | cut -d= -f2 | tr -d \' | xargs -n1 | cut -d/ -f1;
-  grep -e ^ifconfig /tmp/networking-env | grep -v -i 'dhcp' | cut -d= -f2 | tr -d \' | cut -d' ' -f2 | cut -d'/' -f1
-} | sort -u > /tmp/current
-ifconfig -a | grep 'inet ' | cut -d' ' -f2 | sort > /tmp/config
-echo "# Comparing IP differences /tmp/current vs /tmp/config"
-sdiff /tmp/current /tmp/config
+##
+## Network differences
+##
+#cat << 'EOF' >/tmp/command
+#sh -c ". /etc/rc.subr; load_rc_config "networking"; set" > /tmp/networking-env
+#grep -e ^ifconfig -e ^ipv4 /tmp/networking-env
+#{ grep -e ^ipv4 /tmp/networking-env | cut -d= -f2 | tr -d \' | xargs -n1 | cut -d/ -f1;
+#  grep -e ^ifconfig /tmp/networking-env | grep -v -i 'dhcp' | cut -d= -f2 | tr -d \' | cut -d' ' -f2 | cut -d'/' -f1
+#} | sort -u > /tmp/config
+#ifconfig -a | grep 'inet ' | cut -d' ' -f2 | sort > /tmp/current
+#echo "# Comparing IP differences /tmp/current vs /tmp/config"
+#diff -u /tmp/current /tmp/config
+#EOF
+
+##
+## Migrate SSH authorized_keys symlink to new location.
+##
+#cat <<'EOF' > /tmp/command
+#mount -uwo noatime / && unlink /root/.ssh &&  mkdir /root/.ssh && ln -s /etc/ssh/authorized_keys /root/.ssh/ && mount -ur 
+#EOF
+
+##
+## View lvrouted configured flages
+##
+#/usr/local/etc/rc.d/lvrouted rcvar | grep flags
+
+#
+# Sync lvrouted and wl-config files
+#
+cat <<'EOF' > /tmp/command
+mount -uwo noatime / || exit 1
+trap "mount -ur /; exit 1" 1 2 3 15
+trap "mount -ur /; exit 0" 0
+
+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
 EOF
+
 
 # Cleanup old entries
@@ -31,5 +60,8 @@
   : > $stdout_file
   : > $stderr_file
-  cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command' 1>$stdout_file 2>$stderr_file &
+  {
+    scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp
+    cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command'
+  } 1>$stdout_file 2>$stderr_file &
 done
 
