Pavlin Radoslavov | 7175def | 2013-04-03 20:42:57 +0000 | [diff] [blame] | 1 | #! /bin/bash |
2 | |||||
3 | controller=`hostname` | ||||
4 | switches=`sudo ovs-vsctl list-br` | ||||
5 | |||||
6 | function host2ip (){ | ||||
7 | ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'` | ||||
8 | echo $ip | ||||
9 | } | ||||
10 | |||||
11 | for s in $switches; do | ||||
12 | ports=`sudo ovs-vsctl --pretty list-ports $s` | ||||
13 | for p in $ports; do | ||||
14 | sudo ifconfig $p up | ||||
15 | done | ||||
16 | done |