[CFR] reflect resolv.conf update to running application

Hajimu UMEMOTO ume at freebsd.org
Mon Aug 22 15:34:40 GMT 2005


Hi,

>>>>> On Mon, 22 Aug 2005 08:12:54 -0700
>>>>> Brooks Davis <brooks at one-eyed-alien.net> said:

brooks> I'm fine with the cmp version of the change so long as you only perform
brooks> the test if /usr/bin/cmp exists.  dhclient-script may be called before
brooks> /usr exists and must not misbehave under those circumstances.

If /usr/bin/cmp does not exist, The whole test will fail, then it will
work as heretofore.  So, I think we don't need to test if /usr/bin/cmp
exists.
However, if /usr/bin/cmp does not exist, error message will out.  So,
we need to supress it as following:

		if cmp -s /etc/resolv.conf.std /etc/resolv.conf; then
			rm -f /etc/resolv.conf.std
			return 0
		fi 2>/dev/null

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume at mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/


More information about the freebsd-arch mailing list