Package: dictd
Version: 1.0.11
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hi,

For daemons that do not require clean shutdown to perform their
operation it is possible to not explicitly stop the daemon in
runlevels 0 and 6, and let sendsigs take care of stopping the
daemon.

This has been used in Ubuntu for a while to speed up the shutdown
process. The policy has recently been changed to make it compatible
with Debian, and so I am now forwarding you the patch that can
help to bring these benefits in to Debian.

Please consider applying the attached patch, ensuring the the
version number in the postinst snippet is updated to the version
in which you apply the patch.

You can read more on this subject at

https://wiki.ubuntu.com/Teardown
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2008-June/000430.html
http://lists.debian.org/debian-devel/2008/07/msg00005.html

Thanks,

Didier
diff -purN dictd-1.10.11.dfsg/debian/dictd.init dictd-1.10.11.dfsg-ubuntu/debian/dictd.init
--- dictd-1.10.11.dfsg/debian/dictd.init	2008-08-16 15:32:41.000000000 +0200
+++ dictd-1.10.11.dfsg-ubuntu/debian/dictd.init	2008-08-16 15:28:01.000000000 +0200
@@ -5,7 +5,7 @@
 # Required-Start:    $remote_fs $syslog
 # Required-Stop:     $remote_fs $syslog
 # Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Default-Stop:      1
 # Short-Description: Start and stop dictionary server daemon
 ### END INIT INFO
 #
diff -purN dictd-1.10.11.dfsg/debian/dictd.postinst dictd-1.10.11.dfsg-ubuntu/debian/dictd.postinst
--- dictd-1.10.11.dfsg/debian/dictd.postinst	2008-08-16 15:32:41.000000000 +0200
+++ dictd-1.10.11.dfsg-ubuntu/debian/dictd.postinst	2008-08-16 15:28:01.000000000 +0200
@@ -25,3 +25,11 @@ case "$1" in 
 esac
 
 #DEBHELPER#
+
+case "$1" in 
+     configure)
+        # Remove shutdown and reboot links; this init script doesn't need them.
+	if dpkg --compare-versions "$2" lt "1.10.2-3ubuntu1"; then
+	    rm -f /etc/rc0.d/K20dictd /etc/rc6.d/K20dictd
+	fi
+esac
diff -purN dictd-1.10.11.dfsg/debian/rules dictd-1.10.11.dfsg-ubuntu/debian/rules
--- dictd-1.10.11.dfsg/debian/rules	2008-08-16 15:32:41.000000000 +0200
+++ dictd-1.10.11.dfsg-ubuntu/debian/rules	2008-08-16 15:28:01.000000000 +0200
@@ -123,7 +123,7 @@ binary-common:
 #	dh_installcatalogs
 #	dh_installpam
 #	dh_installmime
-	dh_installinit
+	dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
 	dh_installman
 #	dh_installcron
 #	dh_installinfo

Reply via email to