-z "${new_domain_search}" ]; then
return 0
fi
- local x= conf="${signature}\n"
+ local x= conf="${signature}\n" cf="/etc/resolv.conf.${interface}"
if [ -n "${new_domain_search}" ]; then
conf="${conf}search ${new_domain_search}\n"
elif [ -n "${new_domain_name}" ]; then
if type resolvconf >/dev/null 2>&1; then
printf "${conf}" | resolvconf -a "${interface}"
else
+ rm -f "${cf}"
+ if [ -f /etc/resolv.conf.head ]; then
+ cat /etc/resolv.conf.head > "${cf}"
+ fi
+ printf "${conf}" >> "${cf}"
+ if [ -f /etc/resolv.conf.tail ]; then
+ cat /etc/resolv.conf.tail >> "${cf}"
+ fi
save_conf /etc/resolv.conf
- printf "${conf}" > /etc/resolv.conf
+ mv -f "${cf}" /etc/resolv.conf
fi
}