[pkg-dhcp-devel] Bug#700966: Please add resolvconf packaging-event hook script
jdthood at gmail.com
Tue Feb 19 19:01:43 UTC 2013
Please add a hook script /usr/lib/resolvconf/dpkg-event.d/isc-dhcp-client.
The purpose this script is to cause isc-dhcp-client to take notice of
the installation or removal of the resolvconf package. If resolvconf
has just been installed while dhclient instances are running, for
example, then each dhclient instance should register any
nameserver addresses already acquired via DHCP with resolvconf.
The dhclient-enter-hooks.d/resolvconf hook script already does the
right thing if dhclient is started when resolvconf was already installed.
This script also illustrates what needs to be done when resolvconf is
installed while dhclient is running.
See below for an excerpt from resolvconf's README file giving
general information about resolvconf packaging-event hook scripts.
Please see the README file itself for much more background
=== Excerpt from resolvconf README file ===
Any package, foo, that supports supplying information to resolvconf should
include a hook script /usr/lib/resolvconf/dpkg-event.d/foo which, when
with the argument "install", takes whatever actions are necessary to cause
program(s) in foo to supply their nameserver information to resolvconf; and
when called with the argument "remove" takes whatever actions are
given that the resolvconf package has been removed (and, in being removed,
have removed foo's nameserver information).
The hook script thus has the following form.
# The resolvconf dpkg-event hook script for the foo package
if foo_is_running ; then
if [ "$1" = "install" ] ; then
elif [ "$1" = "remove" ] ; then
If foo is controlled by an initscript whose methods take appropriate actions
conditional upon resolvconf's presence then something like the following
if which invoke-rc.d >/dev/null 2>&1 ; then
invoke-rc.d foo force-reload
elif [ -x /etc/init.d/foo ] ; then
case "$1" in
install|remove) force_reload_foo ;;
The hook script is called (with argument "install") from resolvconf's
"configure" method and (with "remove") from resolvconf's postrm "remove"
Foo's hook script is called with argument "install" if and only if foo is
fully installed both when resolvconf's preinst install runs and when its
postinst configure runs. The hook script is called with argument "remove"
and only if foo is fully installed when resolvconf's postrm remove runs.
The hook script must be owned by root and have its execute permission bit
and must have the same name as the package that owns it.
Arguments other than "install" and "remove" are reserved for future use and
must be silently ignored.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pkg-dhcp-devel