[pkg-dhcp-devel] Bug#681698: Bug#681698: /sbin/dhclient: make updating /etc/resolv.conf configurable, make setting default gw configurable

Micah Anderson micah at debian.org
Wed Jun 19 16:04:44 UTC 2013


On Sun, Jul 15, 2012 at 02:36:10PM -0700, Andrew Pollock wrote:
> On Sun, Jul 15, 2012 at 08:26:45PM +0200, folkert wrote:
> > Package: isc-dhcp-client
> > Version: 4.2.2.dfsg.1-5
> > Severity: wishlist
> > File: /sbin/dhclient
> > 
> > Hi,
> 
> Hi,
>  
> > If you ever feel the need to do some coding, I have a couple of suggestions for dhcp:
> > - make updating resolv.conf switchable, so that you can prevent it from doing so
> > - make setting the default gateway switchable
> > 
> > This can be accomplished by manually editting /sbin/dhclient-script but that gives problems if you e.g. want to get def gw on eth0 via dhcp (but not on eth1).
> 
> So you can accomplish the /etc/resolv.conf part today, by redefining the
> make_resolv_conf() function in a custom hook in
> /etc/dhcp/dhclient-enter-hooks.d/ You could make the function be a total
> no-op, and then you have what you want there.

It seems like if you do what you suggest and then restart dhclient,
what you end up with is this:

Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

/var/lib/dhcp/dhclient.eth0.leases line 10: Expecting a domain string.
  option domain-search ;
                        ^
Listening on LPF/eth0/fa:16:3e:71:7c:76
Sending on   LPF/eth0/fa:16:3e:71:7c:76
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.10.3
RTNETLINK answers: File exists
bound to 192.168.10.18 -- renewal in 53 seconds.

I tried to remove that lease file and re-do it, but it happens
again. I have the following in
/etc/dhcp/dhclient-enter-hooks.d/disable_resolv_conf:

make_resolv_conf() { : ; }



More information about the pkg-dhcp-devel mailing list