MFC revisions 1.13 of NETWORKING and 1.37 of resolv:

1. Make resolv order deterministic by REQUIRE'ing it in NETWORKING,
and having resolv REQUIRE netif.
2. Tighten up the code and fix whitespace in resolv
This commit is contained in:
dougb 2007-10-24 21:36:09 +00:00
parent 9561c1895f
commit 194b5d210c
2 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@
# PROVIDE: NETWORKING NETWORK # PROVIDE: NETWORKING NETWORK
# REQUIRE: netif netoptions routing network_ipv6 isdnd ppp # REQUIRE: netif netoptions routing network_ipv6 isdnd ppp
# REQUIRE: routed mrouted route6d mroute6d # REQUIRE: routed mrouted route6d mroute6d resolv
# This is a dummy dependency, for services which require networking # This is a dummy dependency, for services which require networking
# to be operational before starting. # to be operational before starting.

View File

@ -28,6 +28,7 @@
# #
# PROVIDE: resolv # PROVIDE: resolv
# REQUIRE: netif
# KEYWORD: nojail # KEYWORD: nojail
. /etc/rc.subr . /etc/rc.subr
@ -41,15 +42,15 @@ load_rc_config $name
# #
if [ ! -e /etc/resolv.conf -a \ if [ ! -e /etc/resolv.conf -a \
-n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then -n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then
/bin/cat /dev/null > /etc/resolv.conf > /etc/resolv.conf
if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then
echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf
fi fi
set -- `/bin/kenv dhcp.domain-name-servers` set -- `/bin/kenv dhcp.domain-name-servers`
for ns in `IFS=','; echo $*`; do for ns in `IFS=','; echo $*`; do
echo nameserver $ns >> /etc/resolv.conf; echo nameserver $ns >> /etc/resolv.conf;
done done
fi fi