[Resolvconf-devel] resolvconf-event

Thomas Hood jdthood at gmail.com
Thu May 19 12:50:10 UTC 2011

I wrote:
> Each SNI supplies a hook script in /etc/resolvconf/install.d/
> named like itself.  Resolvconf "preinst install" takes the list of
> these files and filters it down to a list of (already) configured
> packages.  It writes this list to a temporary file.  Resolvconf
> "postinst configure" reads in the list and filters it (again) to
> remove packages that are no longer configured.  Then it
> executes each file in the list with the argument "install".
> The prerm does the same and executes each file in the list
> with the argument "remove".

I have implemented this in my working copy order to test it, with
a couple of minor changes.

I have called the hook script directory "/etc/resolvconf/install-remove.d"
for now but I welcome other suggestions.

Not the prerm but the postm executes the hook script with "remove".

Function used to check package status:

    is_installed() {
        dpkg-query -W -f='${Status}\n' "$1" 2>/dev/null | grep -siq '^[[:alpha:]]\+ [[:alpha:]]\+ installed$' >/dev/null 2>&1


More information about the Resolvconf-devel mailing list