Bug#560748: cyrus-sasl2: don't need to call /etc/init.d/saslauthd on shutdown/reboot?

Steve Langasek steve.langasek at canonical.com
Fri Dec 11 22:06:56 UTC 2009


Package: cyrus-sasl2
Version: 2.1.23.dfsg1-3
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu lucid ubuntu-patch

Hi folks,

At http://lists.debian.org/debian-devel/2008/01/msg00007.html ff., it's
discussed that the vast majority of services on the system don't require
explicit 'stop' calls on shutdown or reboot, because the sendsigs "kill all
processes" handling is sufficient.

I believe saslauthd, as a "read-only" daemon with no declared
interdependencies on other services, is definitely one that qualifies to
have its stop links dropped from runlevel [06].  Please find attached a
patch that implements this, based on a change present in the Ubuntu version
of the package.

Description from the changelog:

    - Remove stop links from rc0 and rc6
    - stop service only when switching to single user mode

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
=== modified file 'debian/rules'
--- debian/rules	2009-10-07 21:45:57 +0000
+++ debian/rules	2009-12-11 18:45:41 +0000
@@ -274,7 +274,8 @@
 	cp debian/libsasl2-modules-otp.lintian-overrides \
 		debian/libsasl2-modules-otp/usr/share/lintian/overrides/libsasl2-modules-otp
 	dh_install -s --autodest --list-missing --sourcedir=$(TMPPKG)
-	dh_installinit --name=saslauthd
+	# this used to be "multiuser"
+	dh_installinit --name=saslauthd start 20 2 3 4 5 . stop 20 1 .
 	dh_installman -s
 	dh_link -s
 	dh_strip -s --dbg-package=cyrus-sasl2-dbg

=== modified file 'debian/sasl2-bin.postinst'
--- debian/sasl2-bin.postinst	2009-05-09 22:56:52 +0000
+++ debian/sasl2-bin.postinst	2009-12-11 18:45:41 +0000
@@ -68,6 +68,10 @@
 			dpkg-statoverride --update --add root sasl 660 $SASLDB_FILE
 		fi
 
+		if dpkg --compare-versions "$2" lt "2.1.23.dfsg1-4"; then
+			rm -f /etc/rc0.d/K20saslauthd /etc/rc6.d/K20saslauthd
+		fi
+
 		db_stop
 
 		;;

=== modified file 'debian/sasl2-bin.saslauthd.init'
--- debian/sasl2-bin.saslauthd.init	2008-09-01 11:05:12 +0000
+++ debian/sasl2-bin.saslauthd.init	2009-12-11 18:45:41 +0000
@@ -4,7 +4,7 @@
 # Required-Start:    $local_fs $remote_fs
 # Required-Stop:     $local_fs $remote_fs
 # Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Default-Stop:      1
 # Short-Description: saslauthd startup script
 # Description:       This script starts the saslauthd daemon. It is
 #                    configured using the file /etc/default/saslauthd.



More information about the Pkg-cyrus-sasl2-debian-devel mailing list