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-none.sh b/scripts/ctrl-none.sh index 74349e3..fb8d2a0 100755 --- a/scripts/ctrl-none.sh +++ b/scripts/ctrl-none.sh
@@ -1,9 +1,8 @@ #! /bin/bash controller="" -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 }