[Pkg-sysvinit-devel] Bug#483172: sysv-rc: does not run all shutdown scripts

Petter Reinholdtsen pere at hungry.com
Thu May 29 10:49:00 UTC 2008


[Petter Reinholdtsen]
> Anyway, I'll see what can be done in init.d/rc to work around this
> issue.

Can you test this patch?  It convert the start optimization to a stop
optimization for runlevels 0 and 6.

Index: debian/sysv-rc/etc/init.d/rc
===================================================================
--- debian/sysv-rc/etc/init.d/rc        (revision 1275)
+++ debian/sysv-rc/etc/init.d/rc        (working copy)
@@ -350,7 +350,14 @@
                                # and _no_ stop script in this level, we don't
                                # have to re-start the service.
                                #
-                               [ -f $previous_start ] && [ ! -f $stop ] && continue
+                               if [ start = "$ACTION" ] ; then
+                                   [ -f $previous_start ] && [ ! -f $stop ] && continue
+                               else
+                                   # Workaround for the special
+                                   # handling of runlevels 0 and 6.
+                                   [ -f $previous_stop ] && [ ! -f $previous_start ] && continue
+                               fi
+
                        fi
                        SCRIPTS="$SCRIPTS $i"
                done

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list