Junxiao Shi | 2feae5b | 2014-06-19 02:40:22 -0600 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 3 | source ../multi-host.conf |
| 4 | |
| 5 | LOGPREFIX=$1 |
| 6 | STRATEGY=$2 |
| 7 | |
| 8 | mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_A.log |
| 9 | ssh $CTRL_B "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_B.log" |
| 10 | ssh $CTRL_C "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_C.log" |
| 11 | |
| 12 | sleep 1 |
| 13 | > logs/${LOGPREFIX}_nfdc.log |
| 14 | |
| 15 | nfdc set-strategy / $STRATEGY &>> logs/${LOGPREFIX}_nfdc.log |
| 16 | ssh $CTRL_B "nfdc set-strategy / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log |
| 17 | ssh $CTRL_C "nfdc set-strategy / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log |
| 18 | |
| 19 | ssh $CTRL_C "nfdc register -c 10 /B udp4://$IP4_B1" &>> logs/${LOGPREFIX}_nfdc.log |
| 20 | nfdc register -c 10 /B udp4://$IP4_B1 &>> logs/${LOGPREFIX}_nfdc.log |
| 21 | nfdc register -c 20 /B udp4://$IP4_C1 &>> logs/${LOGPREFIX}_nfdc.log |
| 22 | |