NetBSD/distrib/common/10-resolv.conf
joerg 4764c235e5 Change ramdisks from dhclient to dhcpcd and add corresponding glue to
sysinst. For amd64, the crunchgen binary shrinks by 150KB uncompresssed,
60KB compressed.
2009-04-07 11:49:16 +00:00

23 lines
564 B
Plaintext

# Minimal version using shell builtins.
make_resolv_conf()
{
if [ -z "${new_domain_name_servers}" -a \
-z "${new_domain_name}" -a \
-z "${new_domain_search}" ]; then
return 0
fi
if [ -n "${new_domain_search}" ]; then
echo "search ${new_domain_search}" >> /etc/resolv.conf
elif [ -n "${new_domain_name}" ]; then
echo "search ${new_domain_name}" >> /etc/resolv.conf
fi
for x in ${new_domain_name_servers}; do
echo "nameserver ${x}" >> /etc/resolv.conf
done
}
case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) make_resolv_conf;;
esac