Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 2015 21:58:22 -0700
From:      perryh@pluto.rain.com (Perry Hutchison)
To:        mueller6724@bellsouth.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: disabling dhclient
Message-ID:  <55e3deee.rst6YFxS1jQ%2BSXFE%perryh@pluto.rain.com>
In-Reply-To: <15727.94738.bm@smtp116.sbc.mail.ne1.yahoo.com>
References:  <55e25852.0Xpg4zY1btmbpx9Z%perryh@pluto.rain.com> <CAHu1Y73vEKyNsjJ=_fBYq7D-d7_qdoGDeJ2TKkC3XzN-3sWGUQ@mail.gmail.com> <CAHu1Y723DFkBBmMG9f5tJb=iAfW4L4dC5EeAX124Vn4yvm3Riw@mail.gmail.com> <55e282fc.s%2BOSZJ/KaD3iwr7U%perryh@pluto.rain.com> <15727.94738.bm@smtp116.sbc.mail.ne1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Thomas Mueller" <mueller6724@bellsouth.net> wrote:

> I don't have ifconfig in /etc/rc.conf, dhclient never runs
> automatically on my system.  This is true for both FreeBSD
> and NetBSD.

That used to be true for this system also (or, if it ran, it
didn't do anything).  I don't know what changed.

> There is a line in /etc/defaults/rc.conf 
>
> dhclient_program="/sbin/dhclient"       # Path to dhcp client program.
>
> Setting dhclient_program="/usr/bin/true" in /etc/rc.conf would
> avoid the need to hack dhclient itself

That still seems in the sledgehammer category, since I doubt it's
the intended use of the knob (which is more likely intended to select
a different DHCP client, perhaps from a port).  However, it's worth
a try.

I suspect /bin/sync may be a better choice than /usr/bin/true,
since devd can potentially fire up before /usr has been mounted;
alternatively one could copy /usr/bin/true into /bin or /sbin (but
then we are back to hacking on the system rather than configuring
it).

> I don't know if this would prevent dhclient from working from the
> command line.

If I'm understanding the /etc/dhclient script correctly, it would
effectively disable that script -- which is perfectly OK for this
particular situation.  I would not expect any effect on running
/sbin/dhclient directly.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55e3deee.rst6YFxS1jQ%2BSXFE%perryh>