commit | 640ad69c7d8493707836e486cdd6fb03768c1f59 | [log] [tgz] |
---|---|---|
author | Masayoshi Kobayashi <masayoshi@onlab.us> | Wed Jan 22 23:37:59 2014 -0800 |
committer | Masayoshi Kobayashi <masayoshi@onlab.us> | Wed Jan 22 23:37:59 2014 -0800 |
tree | 721f050e2a765691fe2a06d31676ce4eae081f99 | |
parent | 0616bc87db1e9b11e38f0452ccc1084c9d0d29fc [diff] [blame] |
clean up rest server and related demo scripts
diff --git a/scripts/ctrl-one.sh b/scripts/ctrl-one.sh index 207d3f2..9fe8341 100755 --- a/scripts/ctrl-one.sh +++ b/scripts/ctrl-one.sh
@@ -8,10 +8,9 @@ #controller=`hostname` controller=$1 -switches=`ifconfig -a | grep sw |grep -v eth | awk '{print $1}'` - +switches=`sudo ovs-vsctl list-br` function host2ip (){ - ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'` + ip=`getent hosts $1 | awk '{print $1}' | tail -n 1` echo $ip }