OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import logging, os, subprocess | 4 import logging, os, subprocess |
5 from autotest_lib.client.common_lib import error, utils | 5 from autotest_lib.client.common_lib import error, utils |
6 | 6 |
7 | 7 |
8 # Flag file used to tell backchannel script it's okay to run. | 8 # Flag file used to tell backchannel script it's okay to run. |
9 BACKCHANNEL_FILE = '/mnt/stateful_partition/etc/enable_backchannel_network' | 9 BACKCHANNEL_FILE = '/mnt/stateful_partition/etc/enable_backchannel_network' |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 backchannel('teardown %s' % interface) | 54 backchannel('teardown %s' % interface) |
55 | 55 |
56 def is_network_iface_running(name): | 56 def is_network_iface_running(name): |
57 try: | 57 try: |
58 out = utils.system_output('ifconfig %s' % name) | 58 out = utils.system_output('ifconfig %s' % name) |
59 except error.CmdError, e: | 59 except error.CmdError, e: |
60 logging.info(e) | 60 logging.info(e) |
61 return False | 61 return False |
62 | 62 |
63 return out.find('RUNNING') >= 0 | 63 return out.find('RUNNING') >= 0 |
OLD | NEW |