From owner-freebsd-questions@freebsd.org Mon Aug 31 05:13:17 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD00D9C6B4E for ; Mon, 31 Aug 2015 05:13:17 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FD741DA7 for ; Mon, 31 Aug 2015 05:13:17 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id t7V52xfG031970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 30 Aug 2015 22:03:00 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id t7V52wS9031969; Sun, 30 Aug 2015 22:02:58 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA09237; Sun, 30 Aug 15 21:56:47 PDT 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+SXFE%perryh@pluto.rain.com> References: <55e25852.0Xpg4zY1btmbpx9Z%perryh@pluto.rain.com> <55e282fc.s+OSZJ/KaD3iwr7U%perryh@pluto.rain.com> <15727.94738.bm@smtp116.sbc.mail.ne1.yahoo.com> In-Reply-To: <15727.94738.bm@smtp116.sbc.mail.ne1.yahoo.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 05:13:17 -0000 "Thomas Mueller" 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.