disabling dhclient

Polytropon freebsd at edvax.de
Mon Aug 31 05:29:23 UTC 2015

On Sun, 30 Aug 2015 21:58:22 -0700, Perry Hutchison wrote:
> "Thomas Mueller" <mueller6724 at bellsouth.net> wrote:
> > 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).

The choice of a "no action substitute" might be a problem
when $dhclient_program is called with command line parameters.
Such a program (or custom script) should accept possible
parameters and ignore them. Of course, "sync" fulfills
this requirement.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list