Date: Thu, 31 May 2007 14:50:17 -0700 From: Doug Barton <dougb@FreeBSD.org> To: freebsd-rc@freebsd.org Subject: For review: resolv ordering patch Message-ID: <465F4319.6070504@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------030609080609030602020605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The attached patch makes resolv ordering deterministic, and places it between netif and NETWORKING. It also tightens up the code a little and fixes whitespace issues in resolv. I'm open to suggestions for more precise ordering, but I'd like to get this in sooner than later, and definitely before the freeze. This is designed to fix the issue on RELENG_6 where resolv is not in the early section before including local scripts, but is after (which means that it never gets run). Doug -- This .signature sanitized for your protection --------------030609080609030602020605 Content-Type: text/plain; name="resolv-order.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="resolv-order.diff" diff -u /usr/src/etc/rc.d/NETWORKING ./NETWORKING --- /usr/src/etc/rc.d/NETWORKING Wed May 23 00:24:50 2007 +++ ./NETWORKING Thu May 31 14:30:52 2007 @@ -6,7 +6,7 @@ # PROVIDE: NETWORKING NETWORK # 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 # to be operational before starting. diff -u /usr/src/etc/rc.d/resolv ./resolv --- /usr/src/etc/rc.d/resolv Sat Dec 10 12:21:45 2005 +++ ./resolv Thu May 31 14:48:32 2007 @@ -28,6 +28,7 @@ # # PROVIDE: resolv +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr @@ -41,15 +42,15 @@ # if [ ! -e /etc/resolv.conf -a \ -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 echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf fi - set -- `/bin/kenv dhcp.domain-name-servers` - for ns in `IFS=','; echo $*`; do - echo nameserver $ns >> /etc/resolv.conf; - done + set -- `/bin/kenv dhcp.domain-name-servers` + for ns in `IFS=','; echo $*`; do + echo nameserver $ns >> /etc/resolv.conf; + done fi --------------030609080609030602020605--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465F4319.6070504>