No empty .Rs/.Re
[netbsd-mini2440.git] / distrib / common / 10-resolv.conf
blobce23dc518d71bbfd2213c4556bc46762a04578bd
1 # Minimal version using shell builtins.
3 make_resolv_conf()
5         if [ -z "${new_domain_name_servers}" -a \
6                 -z "${new_domain_name}" -a \
7                 -z "${new_domain_search}" ]; then
8                 return 0
9         fi
10         if [ -n "${new_domain_search}" ]; then
11                 echo "search ${new_domain_search}" >> /etc/resolv.conf
12         elif [ -n "${new_domain_name}" ]; then
13                 echo "search ${new_domain_name}" >> /etc/resolv.conf
14         fi
15         for x in ${new_domain_name_servers}; do
16                 echo "nameserver ${x}" >> /etc/resolv.conf
17         done
20 case "${reason}" in
21 BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT)       make_resolv_conf;;
22 esac