Re: file-rc: File-rc doesn't restore rcX.d dirs at remove, breaks sysv-rc installation.
On Wed, Mar 20, 2013 at 05:04:57PM +0100, Michael Stapelberg wrote:
> at this point I cannot spend any more time on this bug report.
I've tested your patch, and it appears to work correctly in all
the cases I've tried. I've updated it slightly (attached) to
log what's happening during transition to dependency-based boot,
particularly if things go wrong, but it's otherwise functionally
identical to your patch. It also runs insserv in verbose mode
so that any errors/warnings are not hidden (as for sysv-rc).
Alexander, is this approach OK with you? If you're happy with
what this is doing, can this go into wheezy?
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
diff -urN file-rc-0.8.14.original/debian/changelog file-rc-0.8.15/debian/changelog
--- file-rc-0.8.14.original/debian/changelog 2012-08-19 19:56:20.000000000 +0100
+++ file-rc-0.8.15/debian/changelog 2013-03-20 22:39:54.191661297 +0000
@@ -1,3 +1,16 @@
+file-rc (0.8.15) unstable; urgency=low
+
+ [ Michael Stapelberg ]
+ * Call rcfile2link.sh followed by insserv to properly restore links
+ when removing file-rc. (Closes: #688140)
+
+ [ Roger Leigh ]
+ * When migrating to dependency-based boot in the prerm, log
+ what's happening, and if insserv fails issue an informative
+ message (taken from sysv-rc postinst).
+
+ -- Roger Leigh <rleigh@debian.org> Wed, 20 Mar 2013 21:31:30 +0000
+
file-rc (0.8.14) unstable; urgency=low
* Depend on insserv, this prevents upgrade problems with systems
diff -urN file-rc-0.8.14.original/debian/prerm file-rc-0.8.15/debian/prerm
--- file-rc-0.8.14.original/debian/prerm 2012-07-30 06:49:08.000000000 +0100
+++ file-rc-0.8.15/debian/prerm 2013-03-20 22:35:07.459268780 +0000
@@ -16,12 +16,32 @@
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
+# Make sure insserv is in path
+PATH=/sbin:$PATH
case "$1" in
remove)
+ echo "info: restoring rc.d links" 1>&2
+ /usr/share/file-rc/rcfile2link.sh
+ echo "info: running insserv" 1>&2
+ if insserv -v ; then
+ echo "success: Enabled dependency based boot system." 1>&2
+ else
+ echo "error: Something failed while migrating." 1>&2
+ cat 1>&2 <<EOF
+
+error: Unable to migrate to dependency based boot sequencing.
+
+See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for
+more information about dependency based boot sequencing. To
+reattempt the migration process run 'insserv -v' after correcting
+the cause of the problem, and then retry removing file-rc.
+
+EOF
+ fi
;;
upgrade|deconfigure)
- ;;
+ ;;
failed-upgrade)
;;
*)
Reply to: