[Pkg-cyrus-sasl2-commits] r90 - in /cyrus-sasl-2.1/trunk/debian: changelog cyrus-sasl-2.1-bin.saslauthd.init

fabbe at users.alioth.debian.org fabbe at users.alioth.debian.org
Sat Oct 21 07:40:00 UTC 2006


Author: fabbe
Date: Sat Oct 21 07:39:57 2006
New Revision: 90

URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/?sc=1&rev=90
Log:
Alter saslauthd init script to comply with policy and to exit successfully when START!=yes.

Modified:
    cyrus-sasl-2.1/trunk/debian/changelog
    cyrus-sasl-2.1/trunk/debian/cyrus-sasl-2.1-bin.saslauthd.init

Modified: cyrus-sasl-2.1/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/changelog?rev=90&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/changelog (original)
+++ cyrus-sasl-2.1/trunk/debian/changelog Sat Oct 21 07:39:57 2006
@@ -1,9 +1,15 @@
 cyrus-sasl-2.1 (2.1.22-0~pre03) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
+  
+  [ Roberto C. Sanchez ]
   * Acknowledge previous NMU (Closes: #275431)
 
- -- Roberto C. Sanchez <roberto at connexer.com>  Fri, 20 Oct 2006 03:26:56 -0400
+  [ Fabian Fagerholm ]
+  * debian/cyrus-sasl-2.1-bin.saslauthd.init: exit 0 when saslauthd binary
+    is missing (policy 9.3.2) and exit 0 when START != yes.
+
+ -- Fabian Fagerholm <fabbe at debian.org>  Sat, 21 Oct 2006 10:39:34 +0300
 
 cyrus-sasl-2.1 (2.1.22-0~pre02) experimental; urgency=low
 

Modified: cyrus-sasl-2.1/trunk/debian/cyrus-sasl-2.1-bin.saslauthd.init
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/cyrus-sasl-2.1-bin.saslauthd.init?rev=90&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/cyrus-sasl-2.1-bin.saslauthd.init (original)
+++ cyrus-sasl-2.1/trunk/debian/cyrus-sasl-2.1-bin.saslauthd.init Sat Oct 21 07:39:57 2006
@@ -25,20 +25,10 @@
 RUN_DIR=/var/run/$NAME
 PIDFILE=$RUN_DIR/saslauthd.pid
 SCRIPTNAME=/etc/init.d/$NAME
-if [ "$MAINTSCRIPT" == "yes" ]; then
-	# We are being called by postinst or prerm script and need to modify
-	# our exit codes so that package install or removal does not fail for
-	# no reason
-	EXIT_ERROR_CODE=0
-else
-	# We are being called by the admin or something other than a package
-	# maintainer script and are expected to actually pass a non-zero
-	# exit code
-	EXIT_ERROR_CODE=1
-fi
+EXIT_ERROR_CODE=1
 
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit $EXIT_ERROR_CODE
+# Exit if the daemon is not installed
+text -x "$DAEMON" || exit 0
 
 # Read configuration variable file if it is present
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
@@ -50,16 +40,17 @@
 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
 . /lib/lsb/init-functions
 
-# If the daemon is not enabled, give the user a useful error and then exit
-if [ "$START" != "yes" ]; then
-	log_failure_msg "To enable $NAME, edit /etc/default/$NAME and add START=yes"
-	exit $EXIT_ERROR_CODE
+# If the daemon is not enabled, give the user a warning and then exit,
+# unless we are stopping the daemon
+if [ "$START" != "yes" -a "$1" != "stop" ]; then
+	log_warning_msg "To enable $NAME, edit /etc/default/$NAME and set START=yes"
+	exit 0
 fi
 
 # If no mechanisms are defined, log this and exit
 if [ -z $MECHANISMS ]; then
 	log_failure_msg "No mechanisms defined in /etc/default/$NAME," \
-			"not starting $NAME."
+			"not starting $NAME"
 	exit $EXIT_ERROR_CODE
 fi
 




More information about the Pkg-cyrus-sasl2-commits mailing list