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