Package: smartmontools
Version: 5.38-1
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,

James

diff -pruN 5.38-1/debian/rules 5.38-1ubuntu2/debian/rules
--- 5.38-1/debian/rules	2008-07-30 23:30:24.000000000 +0100
+++ 5.38-1ubuntu2/debian/rules	2008-07-30 23:24:37.000000000 +0100
@@ -96,7 +96,7 @@ binary-arch: build install
 #	dh_installemacsen
 #	dh_installpam
 #	dh_installmime
-	dh_installinit
+	dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
 	dh_installcron
 	dh_installman
 	dh_installinfo
diff -pruN 5.38-1/debian/smartmontools.init 5.38-1ubuntu2/debian/smartmontools.init
--- 5.38-1/debian/smartmontools.init	2008-07-30 23:30:24.000000000 +0100
+++ 5.38-1ubuntu2/debian/smartmontools.init	2008-07-30 23:24:37.000000000 +0100
@@ -12,7 +12,7 @@
 # Required-Start:    $syslog $remote_fs
 # Required-Stop:     $syslog $remote_fs
 # Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Default-Stop:      1
 # Short-Description: SMART monitoring daemon
 ### END INIT INFO
 
diff -pruN 5.38-1/debian/smartmontools.postinst 5.38-1ubuntu2/debian/smartmontools.postinst
--- 5.38-1/debian/smartmontools.postinst	1970-01-01 01:00:00.000000000 +0100
+++ 5.38-1ubuntu2/debian/smartmontools.postinst	2008-07-30 23:24:37.000000000 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Remove shutdown and reboot links; this init script does not need them.
+if dpkg --compare-versions "$2" lt "5.36-6ubuntu2"; then
+	rm -f /etc/rc0.d/K20smartmontools /etc/rc6.d/K20smartmontools
+fi
+
+#DEBHELPER#

Reply via email to