Commit 69338517 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Change dns-search logic for depending on defroute

parent 21119541
......@@ -198,21 +198,23 @@ def configure_networking(connection, interface):
for i in interface._ipv6_]))
update['ipv4', 'address-data'] = ipv4a
update['ipv4', 'dns'] = network.dns(interface._ip_)
update['ipv4', 'dns-search'] = network.dns_search(interface._ip_)
update['ipv4', 'method'] = ('disabled','manual')[len(ipv4a) > 0]
update['ipv6', 'address-data'] = ipv6a
update['ipv6', 'dns'] = network.dns(interface._ipv6_)
update['ipv6', 'dns-search'] = network.dns_search(interface._ipv6_)
update['ipv6', 'method'] = ('disabled','manual')[len(ipv6a) > 0]
if interface.defroute[0] == 'no':
update['ipv4', 'gateway'] = None
update['ipv6', 'gateway'] = None
update['ipv4', 'dns-search'] = []
update['ipv6', 'dns-search'] = []
update['ipv4', 'never-default'] = True
update['ipv6', 'never-default'] = True
pass
else:
update['ipv4', 'gateway'] = network.gateway(interface._ip_)
update['ipv6', 'gateway'] = network.gateway(interface._ipv6_)
update['ipv4', 'dns-search'] = network.dns_search(interface._ip_)
update['ipv6', 'dns-search'] = network.dns_search(interface._ipv6_)
update['ipv4', 'never-default'] = None
update['ipv6', 'never-default'] = None
pass
......
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 to comment