#DEBHELPER# token is in the wrong place, and other resolvconf postinst nits
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
resolvconf (Ubuntu) |
Fix Released
|
Undecided
|
Stéphane Graber |
Bug Description
Background: In the Debian version of the resolvconf package, dh_installinit is run with the "--no-start" option and actions equivalent to "invoke-rc.d resolvconf start" are performed later in the postinst after necessary preparation has been done.
The problem: While converting from sysvinit to Upstart, "--no-start" was replaced with "-r" but there are still some loose ends, some minor, but I take this opportunity to mention them as well.
* First, the "#DEBHELPER#" token is in the wrong place. It should be placed after the postinst code that linkifies and initializes the database. The reason is that dh_installinit inserts "invoke-rc.d resolvconf start" at the position of the token. (1) If the "invoke-rc.d resolvconf start" happens before initialization of the database then the initial contents of resolv.conf are out of date. (2) If the "invoke-rc.d resolvconf start" happens before linkification and an update script returns an error condition then linkification does not happen. This may be one of the reasons for the malfunctions reported in bug #1000244.
A good place to put the token is right at the end of the file, just before the "exit 0" line.
This was supposedly fixed at one point as indicated by the following changelog entry
- Move the #DEBHELPER# token in debian/postinst to after the resolv.conf
symlink is set, [...]
but the current version (1.67ubuntu2) has the "#DEBHELPER#" token back up at the top of the file.
* Second, the comment in the postinst still says that "--no-start" is used
# We use dh_installinit with --no-start
whereas this is not true in the Ubuntu version. Please remove this line.
* Third, this comment
has irregular indentation and duplicates the comment that precedes the if-then block. Simplest thing is to remove the comment (but not the mkdir line!).
* Fourth, this comment
# FHS violation; get rid of it, we use /run directly now.
incorrectly (IMHO) states that the use of a symbolic link /etc/resolvconf/run -> (some-tmpfs)
$ ls -l /usr/bin/vi
lrwxrwxrwx 1 root root 20 Jun 13 09:55 /usr/bin/vi -> /etc/alternativ
In Debian, /etc/resolvconf/run has only ever been a symbolic link to some tmpfs. It is a configurable symbolic link.
So please replace the comment with something less controversial, such as the following.
# We use /run directly now.
Related branches
Changed in resolvconf (Ubuntu): | |
status: | Triaged → Fix Committed |
Stéphane, looks like the #DEBHELPER# issue may have been a mismerge into quantal; assigning to you.