From owner-freebsd-current@FreeBSD.ORG Thu Jul 21 20:30:37 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91A8016A41F for ; Thu, 21 Jul 2005 20:30:37 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F27143D46 for ; Thu, 21 Jul 2005 20:30:37 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j6LKUaiA000366; Thu, 21 Jul 2005 13:30:36 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j6LKUaST000365; Thu, 21 Jul 2005 13:30:36 -0700 Date: Thu, 21 Jul 2005 13:30:36 -0700 From: Brooks Davis To: Nate Lawson Message-ID: <20050721203036.GG17516@odin.ac.hmc.edu> References: <42DF419C.90203@root.org> <20050721193617.GD17516@odin.ac.hmc.edu> <42DFFB67.4020602@root.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9Iq5ULCa7nGtWwZS" Content-Disposition: inline In-Reply-To: <42DFFB67.4020602@root.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: FreeBSD Current Subject: Re: dhclient started twice on recent 7-current? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2005 20:30:37 -0000 --9Iq5ULCa7nGtWwZS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 21, 2005 at 12:45:43PM -0700, Nate Lawson wrote: > Brooks Davis wrote: > >On Wed, Jul 20, 2005 at 11:33:00PM -0700, Nate Lawson wrote: > > > >>When booting, dhclient is started just after "hostname". However, once= =20 > >>devd starts, it tries to start dhclient again which fails with a messag= e=20 > >>saying dhclient is already running. > >> > >>Here are the relevant sections from rc.conf: > >>removable_interfaces=3D"an0" > >>ifconfig_fxp0=3D"DHCP" > >>ifconfig_an0=3D"DHCP" > >>hostname=3D"mrspecial" > >>devd_enable=3D"YES" > > > >That's more or less by design. Dhclient needs to start when the link > >comes up in order to work since it dies when the link goes down. It > >also needs to start at startup because too many applications (sendmail > >being the classic culprit) depend having an IP address configured. >=20 > Any way to silence the "already running" error in the script run by devd? The following patch should do it. I can't decide if it's something I should commit or not. -- Brooks Index: dhclient =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/cvs/src/etc/rc.d/dhclient,v retrieving revision 1.20 diff -u -p -r1.20 dhclient --- dhclient 30 Jun 2005 17:50:34 -0000 1.20 +++ dhclient 21 Jul 2005 20:28:10 -0000 @@ -23,7 +23,6 @@ dhclient_start() if [ -x /usr/bin/pgrep ]; then pids=3D`/usr/bin/pgrep -f "dhclient: $ifn(\$| .*)"` if [ -n "$pids" ]; then - echo "${name} ${ifn}: already running?" exit 0 fi fi --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --9Iq5ULCa7nGtWwZS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC4AXrXY6L6fI4GtQRAkUsAJ9hsUo2/vuIvEfgyvvJAyTpXgFR4ACgsA9K H8Ug/G9p+1WSU+UjKPZpMdE= =7fr0 -----END PGP SIGNATURE----- --9Iq5ULCa7nGtWwZS--