Changeset 10634 in genesis
- Timestamp:
- May 1, 2012, 12:38:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/batch-cmd
r10632 r10634 36 36 ## View lvrouted configured flages 37 37 ## 38 #cat <<'EOF' > /tmp/command 38 39 #/usr/local/etc/rc.d/lvrouted rcvar | grep flags 40 #EOF 39 41 42 ## 43 ## Restart lvrouted 44 ## 45 cat <<'EOF' > /tmp/command 46 sleep 30 47 nohup /usr/local/etc/rc.d/lvrouted restart 48 EOF 49 50 ## 51 ## Sync lvrouted and wl-config files 52 ## 53 #cat <<'EOF' > /tmp/command 54 #mount -uwo noatime / || exit 1 55 #trap "mount -ur /; exit 1" 1 2 3 15 56 #trap "mount -ur /; exit 0" 0 40 57 # 41 # Sync lvrouted and wl-config files 58 #cp -v /tmp/wl-config /tools || exit 1 59 #cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1 60 #cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1 42 61 # 43 cat <<'EOF' > /tmp/command 44 mount -uwo noatime / || exit 1 45 trap "mount -ur /; exit 1" 1 2 3 15 46 trap "mount -ur /; exit 0" 0 62 #/usr/local/etc/rc.d/lvrouted rcvar 63 #EOF 47 64 48 cp -v /tmp/wl-config /tools || exit 1 49 cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1 50 cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1 51 EOF 65 ## 66 ## Run /tools/wl-config with random scheduler to avoid gold-rush and killing the 67 ## config generator server 68 ## 69 #cat <<'EOF' > /tmp/command 70 ##sleep `expr $$ % 120` 71 #/tools/wl-config -b 72 #EOF 52 73 53 74 … … 56 77 57 78 for HOST in $HOSTS; do 79 echo "# Working on $HOST" 58 80 stdout_file="$PREFIX-${HOST%%.}.txt" 59 81 stderr_file="stderr-${HOST%%.}.txt" … … 61 83 : > $stderr_file 62 84 { 63 scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp85 #scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp || exit 1 64 86 cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command' 65 87 } 1>$stdout_file 2>$stderr_file &
Note:
See TracChangeset
for help on using the changeset viewer.