Update backchannel.py to use 'ip' instead of 'ifconfig'.
BUG=chromium:410601
TEST=Run cellular_ota tests, which uses backchannel.py.
Change-Id: I90bd772bcc65742777b3b54729c3a9942e87d7a7
Reviewed-on: https://chromium-review.googlesource.com/929870
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
diff --git a/client/cros/backchannel.py b/client/cros/backchannel.py
index f875fd9..0f6a0e7 100644
--- a/client/cros/backchannel.py
+++ b/client/cros/backchannel.py
@@ -205,13 +205,12 @@
"""
try:
- # TODO: Switch to 'ip' (crbug.com/410601).
- out = utils.system_output('ifconfig %s' % name)
+ out = utils.system_output('ip link show dev %s' % name)
except error.CmdError, e:
logging.info(e)
return False
- return out.find('RUNNING') >= 0
+ return out.find('state UP') >= 0
def _is_ethernet_port(port):