diff options
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/host_name.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 5055faa65..27cc336d8 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -172,6 +172,11 @@ def generate(config): dhcp_ns.extend(ns) sd = [d for d in value if key == 'domains'] dhcp_sd.extend(sd) + # Prune duplicate values + # Not order preserving, but then when multiple DHCP clients are used, + # there can't be guarantees about the order anyway + dhcp_ns = list(set(dhcp_ns)) + dhcp_sd = list(set(dhcp_sd)) if not config['no_dhcp_ns']: config['nameserver'] += dhcp_ns |