Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | remote=$ONOS_USER@$OCN |
| 4 | mininet="ssh -t -t $remote screen -L -S mininet" |
| 5 | |
| 6 | CONTROLLERS="$OC1" |
| 7 | if [ "$OC2" != "" ]; then |
| 8 | CONTROLLERS=${CONTROLLERS},${OC2} |
| 9 | fi |
| 10 | if [ "$OC3" != "" ]; then |
| 11 | CONTROLLERS=${CONTROLLERS},${OC3} |
| 12 | fi |
| 13 | |
| 14 | echo >/tmp/invoke_trellis_hag "cd routing/trellis && sudo ./trellis_hag.py -c '$CONTROLLERS'" |
| 15 | chmod +x /tmp/invoke_trellis_hag |
| 16 | scp /tmp/invoke_trellis_hag $remote: |
| 17 | |
| 18 | ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc" |
| 19 | ( |
| 20 | $mininet ./invoke_trellis_hag |
| 21 | scp $remote:$log /tmp/mininet.log |
| 22 | ssh $remote rm -f $log |
| 23 | ) & |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |