From owner-svn-src-all@FreeBSD.ORG Wed Jan 18 18:49:10 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 779521065672; Wed, 18 Jan 2012 18:49:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4C48C8FC19; Wed, 18 Jan 2012 18:49:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 02F2F46B06; Wed, 18 Jan 2012 13:49:10 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 52C5FB968; Wed, 18 Jan 2012 13:49:09 -0500 (EST) From: John Baldwin To: Eygene Ryabinkin Date: Wed, 18 Jan 2012 10:11:04 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201201120648.q0C6mBio096662@svn.freebsd.org> <76N5o2cbOG1xa+/PCENoyerLpsM@HbohoBmewgxm0atwUoKO7zhAAgw> In-Reply-To: <76N5o2cbOG1xa+/PCENoyerLpsM@HbohoBmewgxm0atwUoKO7zhAAgw> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201201181011.04397.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 18 Jan 2012 13:49:09 -0500 (EST) 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 18:49:10 -0000 On Wednesday, January 18, 2012 6:29:10 am Eygene Ryabinkin wrote: > 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). > > > > 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? Seems ok to me. > > 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. > > > > 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=113759&view=markup&pathrev=114213 > > 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? My guess is that it is ok to remove it from netstart. -- John Baldwin