Commit 951f3833 by IK

add missing ifdown line

parent 35799cc8
...@@ -40,6 +40,7 @@ def remove_interfaces_ubuntu(devices): ...@@ -40,6 +40,7 @@ def remove_interfaces_ubuntu(devices):
if ifname in devices: if ifname in devices:
# remove line # remove line
delete_device = True delete_device = True
subprocess.call(('/sbin/ifdown', ifname))
subprocess.call(('/sbin/ip', 'addr', 'flush', 'dev', ifname)) subprocess.call(('/sbin/ip', 'addr', 'flush', 'dev', ifname))
subprocess.call(('/sbin/ip', 'link', 'set', 'dev', ifname, subprocess.call(('/sbin/ip', 'link', 'set', 'dev', ifname,
'down')) 'down'))
...@@ -89,6 +90,8 @@ def change_ip_ubuntu(interfaces, dns): ...@@ -89,6 +90,8 @@ def change_ip_ubuntu(interfaces, dns):
'prefixlen': prefixlen, 'prefixlen': prefixlen,
'gw': conf['gw6' if ip.version == 6 else 'gw4'], 'gw': conf['gw6' if ip.version == 6 else 'gw4'],
'dns': dns}) 'dns': dns})
for ifname, conf in data:
subprocess.call(('/sbin/ifup', ifname))
# example: # example:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment