From owner-freebsd-rc@FreeBSD.ORG Mon Jul 23 11:08:34 2007 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2226716A49C for ; Mon, 23 Jul 2007 11:08:34 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E5E2413C442 for ; Mon, 23 Jul 2007 11:08:33 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6NB8Xkp045440 for ; Mon, 23 Jul 2007 11:08:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6NB8WXt045436 for freebsd-rc@FreeBSD.org; Mon, 23 Jul 2007 11:08:32 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 23 Jul 2007 11:08:32 GMT Message-Id: <200707231108.l6NB8WXt045436@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 23 Jul 2007 11:08:34 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/98758 rc [jail] [patch] Templatize 'jail_fstab' in /etc/rc.d/ja o conf/98846 rc [jail] [patch] Templatize 'jail_rootdir' in /etc/rc.d/ o conf/105689 rc syslogd starts too late at boot o conf/107155 rc [ppp] /etc/rc.d/ppp-user does not bring up pppoe at bo o conf/107364 rc pf fails to start on bootup after system update from F 5 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/48870 rc [PATCH] rc.network: allow to cancel interface status d o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/73677 rc [patch] add support for powernow states to power_profi o conf/74817 rc [patch] network.subr: fixed automatic configuration of o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/79196 rc [PATCH] configurable dummynet loading from /etc/rc.co o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/85363 rc syntax error in /etc/rc.d/devfs o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o conf/88913 rc [patch] wrapper support for rc.subr o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/89870 rc [patch] feature request to make netif verbose rc.conf o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/95162 rc [patch] Missing feature in rc.subr o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/102913 rc [jail] [patch] /etc/rc.d/named killall in jailed OS o conf/103486 rc [rc.d] [jail] [patch] rc.d/jail: mount fstab after dev o conf/103489 rc [rc.d] [jail] [patch] named_chroot_autoupdate doesn't o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/105145 rc [PATCH] add redial function to rc.d/ppp o conf/105568 rc [patch] Add more flexibility to rc.conf, to choose "_e o conf/106009 rc [patch] Fix pppoed startup script to process multiply 27 problems total. From owner-freebsd-rc@FreeBSD.ORG Tue Jul 24 23:42:45 2007 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B21916A41F for ; Tue, 24 Jul 2007 23:42:45 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 1FEB513C45D for ; Tue, 24 Jul 2007 23:42:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 15463 invoked by uid 399); 24 Jul 2007 23:42:44 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 24 Jul 2007 23:42:44 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <46A68E72.8040607@FreeBSD.org> Date: Tue, 24 Jul 2007 16:42:42 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.5 (X11/20070723) MIME-Version: 1.0 To: John Baldwin References: <20070718181039.GA1845@rebelion.Sisis.de> <200707231727.18986.jhb@freebsd.org> <46A596B3.1080506@FreeBSD.org> <200707241149.30767.jhb@freebsd.org> In-Reply-To: <200707241149.30767.jhb@freebsd.org> X-Enigmail-Version: 0.95.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Henrik Brix Andersen , freebsd-rc@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: wpa_supplicant && and no ctrl_interface for wpa_cli X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 24 Jul 2007 23:42:45 -0000 [ I'm adding freebsd-rc for a little more review. The short version is that on Henrik's system the local rc.d files cause rcorder to put cleanvar after netif, which wipes out some important wpa_supplicant stuff. ] John Baldwin wrote: > On Tuesday 24 July 2007 02:05:39 am Doug Barton wrote: >> John Baldwin wrote: >>> On Monday 23 July 2007 05:00:06 pm Henrik Brix Andersen wrote: >>>> On Mon, Jul 23, 2007 at 02:56:27PM -0400, John Baldwin wrote: >>>>> Are you sure? In my output of rcorder, cleanvar gets run before netif >>> (which >>>>> is what kicks off wpa_supplicant). Also, when I looked, other files >>>>> under /var/run that should have been toasted if cleanvar was running > after >>>>> netif were still present. >>>> Yes, I am sure - I tested the patch before shipping it. If you add a >>>> debug 'echo' to cleanvar you can see that it removes the >>>> wpa_supplicant/* files after wpa_supplicant has run. >>> Grrr, the problem is that cleanvar is running at the wrong time then. A > real >>> fix is to figure out that ordering problem. >>> >> Henrix, can you please copy /etc/rc to its own directory, and apply >> the attached patch to it? Then please do the following: >> >> rcorder -s nostart /etc/rc.d/* > rcorder.log 2>&1 >> >> Then run the patched rc, and either send me the 4 (total) files, or >> post the results here. > > I debugged this further and found some interesting results. If I run rcorder > on just /etc/rc.d/* cleanvar gets scheduled after var, but if I run rcorder > on /etc/rc.d/* and my scripts in /usr/local/etc/rc.d, I get a different order > and cleanvar is just before pflog (which REQUIREs cleanvar). John, This is expected (and technically a feature), that's why I asked Henrik to try that patch for rc. > Making 'netif' REQUIRE cleanvar does seem to fix this, I've looked over what you and Henrik posted, and what I have on my system (with just a few local rc.d files) and I agree with you. I don't see anything else between var and netif on any of the three rcorder lists that needs/interacts with the directories that are cleaned by cleanvar, so doing what you suggested sounds like the way to go. > but having rcorder give different > lists is troubling considering we invoke it twice. Would hate to skip a > script and/or run one twice because it moved before or after $early_divider. > In my case it seems that no scripts prior to $early_divider were affected. We work pretty hard to make sure that doesn't happen, but you're right, it isn't impossible. FYI, what happens most often is that something doesn't get run because it moves before $early_late_divider in the second run. When it does happen (or when something like Henrik's problem happens) we have to take another look at the REQUIRE lines to make sure it can't happen again. The reason we try to leave things as loose as possible is so that local scripts (both from ports and from users) CAN affect the rcorder, since in many cases they need to. Of course this gives the port authors a pretty big responsibility to make sure that they don't break things. (The other reason we don't like to make gratuitous changes is the "if it's not broken, don't fix it" rule.) I'm in favor of your patch. Unless I hear from you otherwise (or unless someone on -rc opposes it) I'll assume you're going to commit it. If you'd prefer that I do it, just let me know. Henrik, It would of course be good if you could confirm this works for you, but I don't see why it wouldn't. Doug > You can find my rcorder outputs at http://www.FreeBSD.org/~jhb/rcfun/ > > 'one' is 'rcorder -s nostart /etc/rc.d/*' before I patched netif > 'two' is 'rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/' before > I patched netif (where are all the rcNG style scripts) > 'three' is 'rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/' after > I patched netif. > > Patch to netif: > > Index: netif > =================================================================== > RCS file: /usr/cvs/src/etc/rc.d/netif,v > retrieving revision 1.22 > diff -u -r1.22 netif > --- netif 9 Feb 2007 12:11:26 -0000 1.22 > +++ netif 24 Jul 2007 11:59:40 -0000 > @@ -26,7 +26,7 @@ > # > > # PROVIDE: netif > -# REQUIRE: atm1 ipfilter mountcritlocal serial sppp sysctl > +# REQUIRE: atm1 cleanvar ipfilter mountcritlocal serial sppp sysctl > # KEYWORD: nojail > > . /etc/rc.subr > -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Wed Jul 25 09:58:45 2007 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E440216A417 for ; Wed, 25 Jul 2007 09:58:45 +0000 (UTC) (envelope-from henrik@brixandersen.dk) Received: from solow.pil.dk (relay.pil.dk [195.41.47.164]) by mx1.freebsd.org (Postfix) with ESMTP id A286513C458 for ; Wed, 25 Jul 2007 09:58:45 +0000 (UTC) (envelope-from henrik@brixandersen.dk) Received: from tirith.brixandersen.dk (osgiliath.brixandersen.dk [87.53.223.189]) by solow.pil.dk (Postfix) with ESMTP id 7BA9E1CC4D3; Wed, 25 Jul 2007 11:34:10 +0200 (CEST) Received: by tirith.brixandersen.dk (Postfix, from userid 1001) id F31EBB8D3; Wed, 25 Jul 2007 11:34:09 +0200 (CEST) Date: Wed, 25 Jul 2007 11:34:09 +0200 From: Henrik Brix Andersen To: Doug Barton Message-ID: <20070725093409.GA3878@tirith.brixandersen.dk> Mail-Followup-To: Doug Barton , John Baldwin , freebsd-mobile@freebsd.org, freebsd-rc@freebsd.org References: <20070718181039.GA1845@rebelion.Sisis.de> <200707231727.18986.jhb@freebsd.org> <46A596B3.1080506@FreeBSD.org> <200707241149.30767.jhb@freebsd.org> <46A68E72.8040607@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <46A68E72.8040607@FreeBSD.org> X-PGP-Key: http://www.brixandersen.dk/files/HenrikBrixAndersen.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-rc@freebsd.org, John Baldwin , freebsd-mobile@freebsd.org Subject: Re: wpa_supplicant && and no ctrl_interface for wpa_cli X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 25 Jul 2007 09:58:46 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 24, 2007 at 04:42:42PM -0700, Doug Barton wrote: > John Baldwin wrote: > > Making 'netif' REQUIRE cleanvar does seem to fix this, > > Henrik, >=20 > It would of course be good if you could confirm this works for you, > but I don't see why it wouldn't. I can confirm that this indeed fixes the problem for me. Thanks, both. Regards, Brix --=20 Henrik Brix Andersen --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: GnuPG signed iD8DBQFGpxkRv+Q4flTiePgRAtyeAKCybJ4dG32oz0YCOmYhWmnj3x6RhQCdE0gF brycY2TCYSjEL0wNNjkKmbU= =FzOK -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--