blob: 6f59c15aab4b0bd72078231c411dc0b12b7d2e41 [file] [log] [blame]
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ../multi-host.conf
LOGPREFIX=$1
STRATEGY=$2
mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_A.log
ssh $CTRL_B "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_B.log"
ssh $CTRL_C "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_C.log"
sleep 1
> logs/${LOGPREFIX}_nfdc.log
nfdc set-strategy / $STRATEGY &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_B "nfdc set-strategy / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_C "nfdc set-strategy / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_C "nfdc register -c 10 /B udp4://$IP4_B1" &>> logs/${LOGPREFIX}_nfdc.log
nfdc register -c 10 /B udp4://$IP4_B1 &>> logs/${LOGPREFIX}_nfdc.log
nfdc register -c 20 /B udp4://$IP4_C1 &>> logs/${LOGPREFIX}_nfdc.log