2016-11-30 13:06:11 +00:00
|
|
|
#!/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
|
2016-12-13 14:43:05 +00:00
|
|
|
RESOLV_CONF=$(cat /etc/resolv.conf | sed -r '/^options (timeout|attempts|ndots).*$/d')
|
2016-11-30 13:06:11 +00:00
|
|
|
OPTIONS="options timeout:2\noptions attempts:2\noptions ndots:{{ ndots }}"
|
|
|
|
|
|
|
|
echo -e "$RESOLV_CONF\n$OPTIONS" > /etc/resolv.conf
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
zdnsupdate_restore() {
|
|
|
|
:
|
|
|
|
}
|