dhclient started twice on recent 7-current?
Brooks Davis
brooks at one-eyed-alien.net
Thu Jul 21 20:30:37 GMT 2005
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
> >>devd starts, it tries to start dhclient again which fails with a message
> >>saying dhclient is already running.
> >>
> >>Here are the relevant sections from rc.conf:
> >>removable_interfaces="an0"
> >>ifconfig_fxp0="DHCP"
> >>ifconfig_an0="DHCP"
> >>hostname="mrspecial"
> >>devd_enable="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.
>
> 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
===================================================================
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=`/usr/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
if [ -n "$pids" ]; then
- echo "${name} ${ifn}: already running?"
exit 0
fi
fi
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050721/e7ab2e9c/attachment.bin
More information about the freebsd-current
mailing list