diff -Nru resolvconf-1.63ubuntu7/bin/resolvconf resolvconf-1.63ubuntu8/bin/resolvconf --- resolvconf-1.63ubuntu7/bin/resolvconf 2012-02-01 22:36:37.000000000 +0000 +++ resolvconf-1.63ubuntu8/bin/resolvconf 2012-02-20 19:15:06.000000000 +0000 @@ -113,9 +113,9 @@ fi ;; --enable-updates) - : >| "$ENABLE_UPDATES_FLAGFILE" + : >| "$ENABLE_UPDATES_FLAGFILE" || exit 1 if [ -e "$POSTPONED_UPDATE_FLAGFILE" ] ; then - update_and_exit -u + (update_and_exit -u) || : fi exit 0 ;; diff -Nru resolvconf-1.63ubuntu7/debian/changelog resolvconf-1.63ubuntu8/debian/changelog --- resolvconf-1.63ubuntu7/debian/changelog 2012-02-02 19:59:13.000000000 +0000 +++ resolvconf-1.63ubuntu8/debian/changelog 2012-02-20 19:17:34.000000000 +0000 @@ -1,3 +1,21 @@ +resolvconf (1.63ubuntu8) precise; urgency=low + + * Use a post-stop script for disabling resolvconf, not a pre-stop script, + since upstart seems to be silently ignoring pre-stop when there's no + main process. LP: #933566. + * debian/postinst: mkdir -p /run/resolvconf/interface again, just in case + there's been a reboot between the preinst and postinst which would wipe + out /run. May or may not address LP 933035. + * debian/config, debian/templates, debian/postinst: if we don't know that + /etc/resolv.conf was being dynamically managed before install (in at + least some cases), link the original contents of /etc/resolv.conf to + /etc/resolvconf/resolv.conf.d/tail so that any statically configured + nameservers aren't lost. LP: #923685. + * when called with --enable-updates, ignore failures from the hooks. + LP: #933723. + + -- Steve Langasek Mon, 20 Feb 2012 19:17:32 +0000 + resolvconf (1.63ubuntu7) precise; urgency=low [ Stéphane Graber ] diff -Nru resolvconf-1.63ubuntu7/debian/config resolvconf-1.63ubuntu8/debian/config --- resolvconf-1.63ubuntu7/debian/config 2012-02-01 22:36:37.000000000 +0000 +++ resolvconf-1.63ubuntu8/debian/config 2012-02-20 07:42:52.000000000 +0000 @@ -4,39 +4,30 @@ . /usr/share/debconf/confmodule -adequate_eni() -{ - # Assume that if _any_ dns-nameservers line appears in - # /etc/network/interfaces then that is adequate and we - # don't need to ask the user if he wants to link the - # original file to the dynamic file at medium priority - [ -f /etc/network/interfaces ] && grep -q dns-nameservers /etc/network/interfaces > /dev/null -} +db_input low resolvconf/linkify-resolvconf || : +db_go -case $1 in -configure|reconfigure) - db_input low resolvconf/linkify-resolvconf || : - db_go || : - db_get resolvconf/linkify-resolvconf - if \ - [ "$RET" = "true" ] \ - && [ ! -e /etc/resolvconf/resolv.conf.d/tail ] \ - && [ ! -L /etc/resolvconf/resolv.conf.d/tail ] +db_get resolvconf/linkify-resolvconf + +# No need to ask about creating a 'tail' file if we've already asked +# or if /etc/resolv.conf is already a symlink; this is only for initial +# install. +if [ "$RET" = true ] && db_fget resolvconf/link-tail-to-original seen \ + && [ "$RET" = false ] && ! [ -L /etc/resolv.conf ] +then + if ! grep -q nameserver /etc/resolv.conf 2>/dev/null \ + || grep -q '# Generated by NetworkManager' /etc/resolv.conf 2>/dev/null \ + || grep -Eq '^[[:space:]]*(iface[[:space:]]+.*[[:space:]]+inet[[:space:]]+dhcp|dns-nameserver)' /etc/network/interfaces 2>/dev/null then - if adequate_eni ; then - db_input low resolvconf/link-tail-to-original || : - else - db_input medium resolvconf/link-tail-to-original || : - fi - db_go || : - else + # Either the /etc/resolv.conf is empty, or we've found + # at least one indicator that it's dynamically managed + # in at least some circumstances (via ifupdown dhcp, + # ifupdown 'dns-nameserver' static rules, or NM). No point + # in importing the existing nameservers. db_set resolvconf/link-tail-to-original false fi - db_input medium resolvconf/downup-interfaces || : - db_go || : - ;; -esac - -db_stop - + db_input low resolvconf/link-tail-to-original || : +fi +db_input medium resolvconf/downup-interfaces || : +db_go diff -Nru resolvconf-1.63ubuntu7/debian/postinst resolvconf-1.63ubuntu8/debian/postinst --- resolvconf-1.63ubuntu7/debian/postinst 2012-02-01 22:58:26.000000000 +0000 +++ resolvconf-1.63ubuntu8/debian/postinst 2012-02-20 03:13:29.000000000 +0000 @@ -47,9 +47,20 @@ # Back up original file if [ ! -e /etc/resolvconf/resolv.conf.d/original ] ; then cp -a /etc/resolv.conf /etc/resolvconf/resolv.conf.d/original + db_get resolvconf/link-tail-to-original + if [ "$RET" = "true" ]; then + ln -s original /etc/resolvconf/resolv.conf.d/tail + fi else cp -a /etc/resolv.conf /etc/resolv.conf.dpkg-old fi + + # Even though we create this dir in the preinst, + # don't assume that it's still here; a reboot + # after unpack may have left us with no upstart + # job in place and /run cleaned out. + mkdir -p /run/resolvconf/interface + # Before creating the link, make sure that the original file is # at the target of the link. /sbin/resolvconf will overwrite # this when it does an update, of course. diff -Nru resolvconf-1.63ubuntu7/debian/resolvconf.upstart resolvconf-1.63ubuntu8/debian/resolvconf.upstart --- resolvconf-1.63ubuntu7/debian/resolvconf.upstart 2012-02-01 22:37:07.000000000 +0000 +++ resolvconf-1.63ubuntu8/debian/resolvconf.upstart 2012-02-16 19:57:38.000000000 +0000 @@ -14,6 +14,6 @@ resolvconf --enable-updates end script -pre-stop script +post-stop script resolvconf --disable-updates end script diff -Nru resolvconf-1.63ubuntu7/debian/templates resolvconf-1.63ubuntu8/debian/templates --- resolvconf-1.63ubuntu7/debian/templates 2012-02-01 22:36:37.000000000 +0000 +++ resolvconf-1.63ubuntu8/debian/templates 2012-02-19 02:41:37.000000000 +0000 @@ -59,7 +59,7 @@ Template: resolvconf/link-tail-to-original Type: boolean -Default: false +Default: true _Description: Append original file to dynamic file? If the original static resolver configuration file (/etc/resolv.conf) contains name server addresses, those addresses should be listed on