From owner-freebsd-rc@FreeBSD.ORG Sun Nov 18 14:58:45 2012 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1AF59C9; Sun, 18 Nov 2012 14:58:45 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD9A8FC14; Sun, 18 Nov 2012 14:58:45 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qAIEwcnZ057743; Sun, 18 Nov 2012 07:58:38 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qAIEwEFc028478; Sun, 18 Nov 2012 07:58:14 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: bin/165477: [rc] dhclient is run twice From: Ian Lepore To: Chris Rees In-Reply-To: References: <201211021111.qA2BBHEi008211@freefall.freebsd.org> <20121118.075956.2090347175828215059.hrs@allbsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 18 Nov 2012 07:58:14 -0700 Message-ID: <1353250694.1217.321.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-rc@freebsd.org" , wblock@freebsd.org, "bug-followup@freebsd.org" X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 14:58:45 -0000 On Sun, 2012-11-18 at 14:40 +0000, Chris Rees wrote: > On 17 November 2012 22:59, Hiroki Sato wrote: > > > > I think it is safe to remove the warning message when rc_quiet=YES. > > What do you think about the attached patch? > > I had originally considered that, but it then makes dhclient behave > differently from other scripts; nothing else respects rc_quiet in this > fashion; > > from rc.subr: > start) > if [ -z "$rc_fast" -a -n "$rc_pid" ]; then > echo 1>&2 "${name} already running? > (pid=$rc_pid)." > return 1 > fi > and > > [crees@pegasus]~/workspace/ports/musicpd% sudo service musicpd quietstart > musicpd already running? (pid=83847). > > Chris If not via the rc_quiet mechanism, then please silence it via some other mechanism *to restore historical behavior*. In the past, rc.d/dhclient had its own silent pidfile check and in general the design was to be silently idempotent (presumably because of the way it gets invoked multiple times for the same inteface during rc processing). Somewhere along the line it was changed to use new common rc.subr code to handle the pidfile check, but because the new code is not silent it wasn't really equivelent to the old code. As far as I'm concerned the switch to the new noisy pidfile check for dhclient amounts to the introduction of a bug. If it doesn't get changed I can see years of explaining to customers (who seem to have nothing better to do than spelunk system logs) "don't worry about that, it's normal." -- Ian