[Resolvconf-devel] resolvconf-event

Edward Allcutt edward at allcutt.me.uk
Wed May 18 13:08:38 UTC 2011


On Wed, 18 May 2011, Edward Allcutt wrote:
> Is there any particular reason a dpkg trigger is preferred over
> eg. trigger scripts in /etc/resolvconf/install-trigger.d alongside
> the existing update{-libc}.d provisions? I can't see an obvious
> reason why the resolvconf postinst hitting those after resolvconf
> is configured wouldn't guarantee the same behaviour.

On further reflection, it occurs to me that handling triggers in the
postinst would give much better control (and continuity). One could
1) set up resolvconf to accept nameserver details but not replace resolv.conf
2) use the triggers to solicit nameserver details
3) replace resolv.conf

In this sequence, granted certain assumptions[0], resolv.conf is never missing
crucial nameserver details. In contrast, the sequence with dpkg triggers goes
something like[1]:
1) (resolvconf postinst) set up resolvconf to accept nameserver details and replace resolv.conf
2) resolv.conf is empty/stale
3) triggers run and incrementally update resolv.conf

Now you've already partially circumvented this by keeping the current contents
during step 1, but this introduces the new problem of expiring stale details.
Perhaps this is a small enough problem that we can live with it until the next
boot?

Either way there is still a problem with previous manual configuration[2]. The
schemes still require manually editing /etc/resolvconf/resolv.conf.d/base in
some cases. I can't see a way around some manual intervention short of requiring
all dynamic resolv.conf updates to be done through resolvconf[3], and even that
only covers new installs after such a policy is in place[4].

[0] Primarily that everything that previously populated resolv.conf has
     registered a trigger.
[1] Perhaps dpkg triggers give you slightly more control than I expect here.
[2] Including anything written by d-i or boot-floppies in the distant past.
[3] And I forsee some opposition if that is suggested.
[4] "Easily" solved using the release notes I suspect.

Enough rambling. ;)

-- 
Edward Allcutt



More information about the Resolvconf-devel mailing list