Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2005 15:04:40 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Hajimu UMEMOTO <ume@freebsd.org>
Cc:        Peter Jeremy <PeterJeremy@optushome.com.au>, Robert Watson <rwatson@freebsd.org>, arch@freebsd.org
Subject:   Re: [CFR] reflect resolv.conf update to running application
Message-ID:  <867jee5dhz.fsf@xps.des.no>
In-Reply-To: <ygeacjbyj5g.wl%ume@mahoroba.org> (Hajimu UMEMOTO's message of "Sun, 21 Aug 2005 14:05:15 %2B0900")
References:  <ygefyt4yiaz.wl%ume@mahoroba.org> <20050821003536.P14178@fledge.watson.org> <20050821040454.GP13959@cirb503493.alcatel.com.au> <ygeacjbyj5g.wl%ume@mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hajimu UMEMOTO <ume@freebsd.org> writes:
> +		if diff /etc/resolv.conf.std /etc/resolv.conf >/dev/null 2>&1; then
> +			rm -f /etc/resolv.conf.std
> +			return 0
> +		fi
> +

use 'cmp -s' instead of diff.  It returns 0 when the files are
identical, 1 when they differ and 2 when one of the files does not
exist or is not readable, and never prints anything.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867jee5dhz.fsf>