[Simon Josefsson] > A patch to implement the preinst/postinst hooks necessary to solve > upgrades would be really appreciated, as I haven't had time to look > into that. I'm not experienced with how to test such a patch, help?
I believe this patch should do the trick, trying to detect the incorrect state and remove the script to allow debhelper to reinsert it with the correct runlevel state. diff -urN ../shishi-0.0.40/debian/shishi-kdc.postinst ../shishi-0.0.40-pere/debian/shishi-kdc.postinst --- ../shishi-0.0.40/debian/shishi-kdc.postinst 1970-01-01 01:00:00.000000000 +0100 +++ ../shishi-0.0.40-pere/debian/shishi-kdc.postinst 2009-10-03 23:00:34.000000000 +0200 @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +# Recover from incorrect init.d script headers in version 0.0.40-1 and earlier +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "0.0.40-1" \ + && [ -f /etc/rc3.d/S[0-9][0-9]shishi-kdc ] \ + && [ -f /etc/rc2.d/K[0-9][0-9]shishi-kdc ] ; then + update-rc.d -f shishi-kdc remove +fi + +#DEBHELPER# To test it, install the package in a sid chroot, see that a stop symlink is created in /etc/rc2.d/, upgrade to a package fixing the issue and verify that the symlink in rc2.d/ become a start symlink. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org