Fix support dynamic UseDNS in systemd-networkd control functions

This commit is contained in:
Evgeny Sinelnikov 2021-10-29 05:20:17 +04:00
parent cf8b332a5e
commit 9808d64c6c

View File

@ -1208,8 +1208,10 @@ write_systemd_networkd_bootproto()
for ns in $(read_iface_dns "$cachedir"); do
add_systemd_networkd_ini_option "$network_filename" "Network" "DNS" "$ns"
done
ini_config_is_set "$network_filename" "Network" "DNS" ||
write_systemd_networkd_ini_option "$network_filename" "Network" "UseDNS" "yes"
value=yes
[ -z "$ipv4_static" ] || value=
overwrite_systemd_networkd_ini_option "$network_filename" "DHCPv4" "UseDNS" "$value"
}
### system-networkd functions