By default the script dhclient-script.linux updates /etc/resolv.conf
with name servers received via DHCP. As noted in bugs #681698 and
#688864, in some cases this is not the desired action.
Also noted in the reply to bug #681698, this can be solved by
redefining the make_resolv_conf() function in a custom hook.
In some cases the desired action is to perform exactly the same
function as make_resolv_conf(), but using a different file path for
resolv.conf (while leaving the default file /etc/resolv.conf
untouched).
Duplicating make_resolv_conf() in a custom hook means updates to this
function from package upgrades will not be carried over to the custom
hook. A cleaner solution would be to allow a custom hook to simply
override the default location of resolv.conf if required.
This requires a very small change to the existing script and it would
be a useful addition to allow name server updates to be diverted away
from /etc/resolve.conf as requested in the two bugs referenced above.
This change is a minor update to the recently added fix for bug
#687337. If no custom hook defines a path for resolv.conf the script
uses exactly the same default as before this change.
A patch file for this change is attached.
---
Patch summary:
[PATCH] Allow resolv.conf path to be set by custom hook
A custom hook in /etc/dhcp/dhclient-enter-hooks.d/ can now set the
path for the file which will receive name server updates from DHCP.
The default path is "/etc/resolv.conf".
---
debian/dhclient-script.linux | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)