From owner-svn-src-all@FreeBSD.ORG Wed Jan 18 11:29:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002261065673; Wed, 18 Jan 2012 11:29:14 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 73FF68FC16; Wed, 18 Jan 2012 11:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=TH5g7ZicF8/tnlQ8Mu0kVt+IEtKDafvlYtFHJni+KE8=; b=qdxfEyRQJC/XGIs2obf9d/cqDb2FCuO7s8rWdKlrYq3BgcBRmZWQ31E8P7wKFOH42Qx4m1FjJUA3wZFHiC31LGSsogszmsXD2VWathe8RxNbUM3nKODoGgwzFEdH8iTeo4Ij4sMu5VOdb3roQ5FhlLOMKXUhH1Yivh/9LfNxjY0e5zF2nXghUzGlrXQGGK+R9DZ6/RghJNhtKvDzLe7F/lvIbEOO64N2G/fce+4/QxsX7GnbszUbsWSk+97sqj2TZJJyyu+KcQefPRBA3OQDlaDtKP2aP+kl+0v8X9nJ1iWHF52Ui28rFFf03tFLVvP4AsU0og6Vbyn5UsAWvLwlIQ==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1RnThZ-000Kgm-7r; Wed, 18 Jan 2012 14:29:13 +0300 Date: Wed, 18 Jan 2012 15:29:10 +0400 From: Eygene Ryabinkin To: John Baldwin Message-ID: <76N5o2cbOG1xa+/PCENoyerLpsM@HbohoBmewgxm0atwUoKO7zhAAgw> References: <201201120648.q0C6mBio096662@svn.freebsd.org> <201201120748.28564.jhb@freebsd.org> <201201121438.16674.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="llIrKcgUOe3dCx0c" Content-Disposition: inline In-Reply-To: Sender: rea@codelabs.ru Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230007 - in head: etc etc/rc.d share/man/man8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2012 11:29:15 -0000 --llIrKcgUOe3dCx0c Content-Type: multipart/mixed; boundary="Fig2xvG2VGoz8o/s" Content-Disposition: inline --Fig2xvG2VGoz8o/s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Fri, Jan 13, 2012 at 11:21:48AM +0400, Eygene Ryabinkin wrote: > But seems like the whole problem is that I used the err() function > instead of doing 'echo $errmsg; exit 1'. Such code shouldn't be > conditionalized for the devd, since it is only syslog message that > worried people; devd doesn't care what is written to the standard > output or the standard error by the scripts it invokes once it become > the daemon, since everything goes to /dev/null after calling > daemon(3). >=20 > So, seems like that the following dhclient_pre_check() will make > everyone happy: > {{{ > dhclient_pre_check() > { > if [ -z "${rc_force}" ] && ! dhcpif $ifn; then > echo "'$ifn' is not a DHCP-enabled interface" > exit 1 > fi > } > }}} > Hadn't tested it yet, but will do it today. The attached patch that just changes 'err' to 'echo ...; exit 1' works fine for me. Any views on it? > The related topic: in the process of grepping for dhclient within > /etc, I had found that /etc/netstart still wants to invoke it. But it > will do a lone '/etc/rc.d/dhclient quietstart' and this will never > be useful in the current state of dhclient: it will refuse to process > any commands without the interface being specified. And since we > have the invocation of /etc/rc.d/netif just two lines above, I think > that it will be good to remove call to dhclient from /etc/netstart. >=20 > At the time of the original addition of call to dhclient to /etc/netstart > (r114213), dhclient script had another form, > http://svnweb.freebsd.org/base/head/etc/rc.d/dhclient?revision=3D113759= &view=3Dmarkup&pathrev=3D114213 > and it was really a normal rc.d script that requires only one argument. > Now it is more of a helper-type script. > . > Am I missing something important here or the removal can really be > done? Anyone can say anything about /etc/netstart issue? Thanks. --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --Fig2xvG2VGoz8o/s Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="dhclient-use-echo.diff" Content-Transfer-Encoding: quoted-printable --- /usr/src/etc/rc.d/dhclient 2012-01-12 15:16:05.000000000 +0400 +++ /etc/rc.d/dhclient 2012-01-18 15:25:30.000000000 +0400 @@ -25,11 +25,11 @@ local msg msg=3D"'$ifn' is not a DHCP-enabled interface" if [ -z "${rc_quiet}" ]; then - err 1 "$msg" + echo "$msg" else debug "$msg" - exit 1 fi + exit 1 fi } =20 --Fig2xvG2VGoz8o/s-- --llIrKcgUOe3dCx0c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk8WrQYACgkQFq+eroFS7PvxuwD/YGUQjA6HF3Ov3Kzin/UR6a3H 6wULeRjH37QaAJeObv8A/iQRZF/9yZghQwqfU1vxcHGL/1e3FKTMEYy7cYMdFtGn =Kf5v -----END PGP SIGNATURE----- --llIrKcgUOe3dCx0c--