Package: dnsmasq
Severity: wishlist
Please add the hook script /etc/resolvconf/packaging-event.d/dnsmasq.
The purpose this script is to cause dnsmasq to take notice of
the installation or removal of the resolvconf package. If resolvconf
has been installed, for example, then dnsmasq should register its
IP address with resolvconf.
See below for an except from resolvconf's README file giving
general information about resolvconf packaging-event hook scripts.
For dnsmasq the following script should suffice.
#!/bin/sh
# Resolvconf packaging event hook script for the dnsmasq package
case "$1" in
install|remove) invoke-rc.d foo restart ;;
esac
=== Excerpt from resolvconf 1.54 README file ===
Usage information for maintainers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...] All suppliers of
nameserver information should supply their information to resolvconf after
resolvconf has been installed.
As of resolvconf release 1.54 this is supported via the following mechanism.
Any package, foo, that supports supplying information to resolvconf should
include a hook script /etc/resolvconf/packaging-event.d/foo which, when called
with the argument "install", takes whatever actions are necessary to cause the
program(s) in foo to supply their nameserver information to resolvconf; and
when called with the argument "remove" takes whatever actions are appropriate
given that the resolvconf package has been removed (and, in being removed, may
have removed foo's nameserver information from resolv.conf).
The hook script thus has the following form.
#!/bin/sh
#
# /etc/resolvconf/packaging-event.d/foo
#
# The resolvconf packaging event hook script for the foo package
#
if foo_is_running ; then
if [ "$1" = "install" ] ; then
foo-ctrl send-nameserver-info-to-resolvconf
elif [ "$1" = "remove" ] ; then
...
fi
fi
If foo is controlled by an initscript whose methods take appropriate actions
conditional upon resolvconf's presence then something like the following might
be appropriate.
case "$1" in
install|remove) invoke-rc.d foo force-reload ;;
esac
The hook script is called (with argument "install") from resolvconf's postinst
"configure" method and (with "remove") from resolvconf's postrm "remove"
method.
The 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" if 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 set
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.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]