#681698 /sbin/dhclient: make updating /etc/resolv.conf configurable, make setting default gw configurable #681698
- Package:
- isc-dhcp-client
- Source:
- isc-dhcp
- Description:
- DHCP client for automatically obtaining an IP address
- Submitter:
- folkert
- Date:
- 2026-08-05 17:33:48 UTC
- Severity:
- wishlist
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).
Hi, 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. As for default gateway behaviour, that's a bit more difficult today. It is my longer term vision for /sbin/dhclient-script to be a large collection of shell functions that can be user-overridden by way of hooks.
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() { : ; }
Dear submitter, as the package isc-dhcp has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1143544 The version of this package that was in Debian prior to this removal can still be found using https://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Thorsten Alteholz (the ftpmaster behind the curtain)