Here is a patch which survives some basic testing. The tricky part turns out to be cleaning up after a change to the .service file. The available helpers don't handle this properly. In order to remove the obsolete symbolic link /etc/systemd/system/network.target.wants/resolvconf.service on a system without systemctl installed I resorted to using rm, but I don't know how evil that is. Comments, please.
$ git diff debian/1.75..HEAD | cat - diff --git a/debian/changelog b/debian/changelog index 56d3e91..e2a1971 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +resolvconf (1.76) unstable; urgency=medium + + * resolvconf.service: Install into sysinit.target, not into + network.target (Closes: #749405) + + -- Thomas Hood <jdth...@gmail.com> Tue, 24 Jun 2014 11:50:33 +0200 + resolvconf (1.75) unstable; urgency=low * [49dedb8] Update man page re: "dns-nameserver" (Closes: 718021) diff --git a/debian/postinst b/debian/postinst index cb50a26..750e350 100755 --- a/debian/postinst +++ b/debian/postinst @@ -29,6 +29,18 @@ rm -f /etc/dhcp3/dhclient-enter-hooks.d/resolvconf # We use dh_installinit with --no-start #DEBHELPER# +### Clean up old symlinks from release 1.75: see #749405 ### +case "$1" in + configure) + if [ "$2" = "1.75" ] ; then + if which systemctl >/dev/null 2>&1 ; then + systemctl reenable resolvconf + else + rm -f /etc/systemd/system/network.target.wants/resolvconf.service || : + fi + fi + ;; +esac ### Create run-time directories and linkify ### # diff --git a/debian/resolvconf.service b/debian/resolvconf.service index 2a7285d..94fde69 100644 --- a/debian/resolvconf.service +++ b/debian/resolvconf.service @@ -11,4 +11,4 @@ ExecStart=/sbin/resolvconf --enable-updates ExecStop=/sbin/resolvconf --disable-updates [Install] -WantedBy=network.target +WantedBy=sysinit.target