Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2005 13:30:36 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Nate Lawson <nate@root.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: dhclient started twice on recent 7-current?
Message-ID:  <20050721203036.GG17516@odin.ac.hmc.edu>
In-Reply-To: <42DFFB67.4020602@root.org>
References:  <42DF419C.90203@root.org> <20050721193617.GD17516@odin.ac.hmc.edu> <42DFFB67.4020602@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050721203036.GG17516>