Bug#777228: Please add resolvconf packaging-event hook script

2015-02-22 Thread Thomas Hood
Aak, the correct path is /usr/lib/resolvconf/dpkg-event.d/. The other path
beginning with /etc is obsolete and only got mentioned because I copypasted
text from another message. My apologies!
-- 
Thomas
Op 21 feb. 2015 23:31 schreef Robert Edmonds edmo...@debian.org:

 Thomas Hood wrote:
  Please add the hook script /etc/resolvconf/packaging-event.d/unbound.
  [...]
  Any package, foo, that supports supplying information to resolvconf
 should
  include a hook script /usr/lib/resolvconf/dpkg-event.d/foo [...]

 Hi,

 Can you clarify the path to the hook script that unbound should use?
 Should it be /etc/resolvconf/packaging-event.d/unbound or
 /usr/lib/resolvconf/dpkg-event.d/unbound?

 --
 Robert Edmonds
 edmo...@debian.org



Bug#777228: Please add resolvconf packaging-event hook script

2015-02-21 Thread Robert Edmonds
Thomas Hood wrote:
 Please add the hook script /etc/resolvconf/packaging-event.d/unbound.
 [...]
 Any package, foo, that supports supplying information to resolvconf should
 include a hook script /usr/lib/resolvconf/dpkg-event.d/foo [...]

Hi,

Can you clarify the path to the hook script that unbound should use?
Should it be /etc/resolvconf/packaging-event.d/unbound or
/usr/lib/resolvconf/dpkg-event.d/unbound?

-- 
Robert Edmonds
edmo...@debian.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#777228: Please add resolvconf packaging-event hook script

2015-02-06 Thread Thomas Hood
Package: unbound
Version: 1.4.22-3
Severity: wishlist

Please add the hook script /etc/resolvconf/packaging-event.d/unbound.
The purpose of this script is to cause unbound to take notice of the
installation or removal of the resolvconf package. If resolvconf has
been installed then unbound should register its listen IP address with
resolvconf.

See below for an except from resolvconf's README file giving general
information about resolvconf packaging-event hook scripts.

For unbound, the following script should suffice. However, if there is
a more efficient way of causing unbound to register its listen address
with resolvconf then of course do it that way.

=== /etc/resolvconf/packaging-event.d/unbound ===

#!/bin/sh
# Resolvconf packaging event hook script for the unbound package

restart_unbound() {
if which invoke-rc.d /dev/null 21 ; then
invoke-rc.d unbound restart
elif [ -x /etc/init.d/unbound ] ; then
/etc/init.d/unbound restart
fi
}

case $1 in
  install) restart_unbound ;;
esac

=== Excerpt from resolvconf README ===

Any package, foo, that supports supplying information to resolvconf should
include a hook script /usr/lib/resolvconf/dpkg-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.

The hook script thus has the following form.

#!/bin/sh
#
# /usr/lib/resolvconf/dpkg-event.d/foo
#
# The resolvconf dpkg-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.

force_reload_foo() {
if which invoke-rc.d /dev/null 21 ; then
invoke-rc.d foo force-reload
elif [ -x /etc/init.d/foo ] ; then
/etc/init.d/foo force-reload
fi
}
case $1 in
install|remove) force_reload_foo ;;
esac

The hook script is called (with argument install) from resolvconf's postinst
configure method and (with remove) from resolvconf's postrm remove
method.

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 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 debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org