Changeset 10661 in genesis for tools/batch-cmd
- Timestamp:
- May 3, 2012, 6:34:41 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/batch-cmd
r10638 r10661 11 11 12 12 echo "# WARN: Going to run at: " $HOSTS; sleep 2 13 scp_files="" 14 concurrent=true 13 15 14 16 ## … … 50 52 51 53 ## 52 ## Sync lvrouted and wl-configfiles54 ## Sync some files 53 55 ## 56 #scp_files="/tmp/wl-config /tmp/nameserver-shuffle" 54 57 #cat <<'EOF' > /tmp/command 55 58 #mount -uwo noatime / || exit 1 … … 58 61 # 59 62 #cp -v /tmp/wl-config /tools || exit 1 60 #cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1 61 #cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1 63 #cp -v /tmp/nameserver-shuffle /tools || exit 1 62 64 # 63 #/usr/local/etc/rc.d/lvrouted rcvar 65 #mount -ur / || exit 1 66 #/tools/wl-config -b || exit 1 67 #/tools/nameserver-shuffle || exit 1 64 68 #EOF 65 69 … … 68 72 ## config generator server 69 73 ## 70 #cat <<'EOF' > /tmp/command 71 ##sleep `expr $$ % 120` 72 #/tools/wl-config -b 73 #EOF 74 cat <<'EOF' > /tmp/command 75 sleep `expr $$ % 300` 76 /tools/wl-config -b || exit 1 77 /tools/nameserver-shuffle || exit 1 78 EOF 74 79 75 80 ## … … 82 87 ## 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 83 88 ## 84 cat << 'EOF' > /tmp/command85 traceroute -m 15 -w 1 -q 1 -I rvdzwet.nl86 EOF89 #cat << 'EOF' > /tmp/command 90 #traceroute -m 15 -w 1 -q 1 -I rvdzwet.nl 91 #EOF 87 92 88 93 … … 96 101 : > $stdout_file 97 102 : > $stderr_file 98 { 99 #scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp || exit 1 103 if $concurrent; then 104 { 105 if [ -n "$scp_files" ]; then 106 scp -o ConnectTimeout=3 -o BatchMode=yes $scp_files root@$HOST:/tmp || exit 1 107 fi 108 cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command' 109 } 1>$stdout_file 2>$stderr_file & 110 else 111 if [ -n "$scp_files" ]; then 112 scp -o ConnectTimeout=3 -o BatchMode=yes $scp_files root@$HOST:/tmp || exit 1 113 fi 100 114 cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command' 101 } 1>$stdout_file 2>$stderr_file &115 fi 102 116 done 103 117
Note:
See TracChangeset
for help on using the changeset viewer.