diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-06-08 15:26:45 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-06-08 15:26:45 +0530 |
commit | 9489d55123dfa4f82d702ecab6b608d44a8dd5f0 (patch) | |
tree | 2e339526a18ac723993045a93b9dabd17287d644 | |
parent | 27e8474a1c287b0aa2577a2182f252a801a42869 (diff) |
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | ubuntu/scripts/wlan-download-test.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ubuntu/scripts/wlan-download-test.sh b/ubuntu/scripts/wlan-download-test.sh index 1c00edc..c219032 100755 --- a/ubuntu/scripts/wlan-download-test.sh +++ b/ubuntu/scripts/wlan-download-test.sh @@ -41,7 +41,7 @@ RET=0 pre_setup() { # print ifconfig to know available interfaces - ifconfig + ip addr # make sure that rp_filter is set to 0 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter @@ -50,7 +50,7 @@ pre_setup() { get_interface_and_ipaddr() { # Assume eth and wlan are up and running - WLAN_INTERFACE=`/sbin/ifconfig | grep wlan | awk '{print $1}'` + WLAN_INTERFACE=`ip addr | grep "state UP" -A2 | tail -1 | awk '{ print $NF }'` echo wlan interface $WLAN_INTERFACE OLD_GATEWAY_IP=`ip route list | grep default |awk '{print $3}'` |