Files
kubespray/roles/kubernetes/preinstall/templates/dhclient_dnsupdate_rh.sh.j2
Zakhar Dvurechensky 9049703ce0 roles: rely on configured defaults (#13249)
Signed-off-by: Zakhar Dvurechensky <72825626+Zakharden@users.noreply.github.com>
2026-05-27 15:09:50 +05:30

18 lines
513 B
Django/Jinja

#!/bin/sh
#
# Prepend resolver options to /etc/resolv.conf after dhclient`
# regenerates the file. See man (5) resolver for more details.
#
zdnsupdate_config() {
if [ -n "$new_domain_search" -o -n "$new_domain_name_servers" ]; then
RESOLV_CONF=$(cat /etc/resolv.conf | sed -r '/^options (timeout|attempts|ndots).*$/d')
OPTIONS="options timeout:{{ dns_timeout }} attempts:{{ dns_attempts }} ndots:{{ ndots }}"
echo -e "$RESOLV_CONF\n$OPTIONS" > /etc/resolv.conf
fi
}
zdnsupdate_restore() {
:
}