aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os_net_config/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/os_net_config/utils.py b/os_net_config/utils.py
index da7ab11..4e25d30 100644
--- a/os_net_config/utils.py
+++ b/os_net_config/utils.py
@@ -60,13 +60,13 @@ def _is_active_nic(interface_name):
operstate = None
with open(_SYS_CLASS_NET + '/%s/operstate' % interface_name, 'r') as f:
- operstate = f.read().rstrip()
+ operstate = f.read().rstrip().lower()
address = None
with open(_SYS_CLASS_NET + '/%s/address' % interface_name, 'r') as f:
address = f.read().rstrip()
- if has_device_dir and operstate == 'UP' and address:
+ if has_device_dir and operstate == 'up' and address:
return True
else:
return False