Comment 10 for bug 38009

Revision history for this message
Sebastian Kapfer (caci) wrote :

No, you're entirely correct, and I agree with you, see my comment in bug #33362. My patch works for new installations, it does not handle upgrades properly. I thought that upgrades didn't matter because the package was broken before anyway.

But there was a working version in Breezy, and we need to handle updates from that version.

My proposal for fixing this mess is the following:

* In the postinst script, find out whether or not we have a working "run" directory. If so, move its contents to /var/run/resolvconf so resolvconf keeps working until reboot. If no such directory exists, resolvconf was in a broken state and will only work after the next reboot (no regression).

* Unconditionally replace /etc/resolvconf/run by a symlink to /var/run/resolvconf.

* If /etc/resolv.conf is a symlink, replace by a symlink to /etc/resolvconf/run/resolv.conf. (This should be the case anyway, but let's play safe.)

* Stop supporting any other configuration but /etc/resolvconf/run being a symlink to /var/run/resolvconf. This removes a whole lot of logic from the maintainer scripts. /var/run is the only sensible solution with the Dapper boot sequence.

* If the "run" symlink has been changed from our default config, abort the init script, giving a useful error message which indicates that such a configuration is not supported.

Any comments?