[Pkg-mailman-hackers] Pkg-mailman commit - rev 327 - trunk/debian

Thijs Kinkhorst thijs at costa.debian.org
Tue Aug 15 11:50:29 UTC 2006


Author: thijs
Date: 2006-08-15 11:50:28 +0000 (Tue, 15 Aug 2006)
New Revision: 327

Modified:
   trunk/debian/changelog
   trunk/debian/control
   trunk/debian/mailman.init
Log:
Use LSB output functions in init script.
Clean up its spacing.


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-14 17:09:44 UTC (rev 326)
+++ trunk/debian/changelog	2006-08-15 11:50:28 UTC (rev 327)
@@ -1,8 +1,8 @@
 mailman (1:2.1.8-3) UNRELEASED; urgency=low
 
-  * 
+  * Use LSB output functions in init script.
 
- -- Thijs Kinkhorst <thijs at debian.org>  Mon, 14 Aug 2006 19:09:22 +0200
+ -- Thijs Kinkhorst <thijs at debian.org>  Tue, 15 Aug 2006 13:49:48 +0200
 
 mailman (1:2.1.8-2) unstable; urgency=low
 

Modified: trunk/debian/control
===================================================================
--- trunk/debian/control	2006-08-14 17:09:44 UTC (rev 326)
+++ trunk/debian/control	2006-08-15 11:50:28 UTC (rev 327)
@@ -9,7 +9,7 @@
 Package: mailman
 Architecture: any
 Pre-Depends: debconf (>= 1.4.16) | debconf-2.0
-Depends: ${shlibs:Depends}, python (>= 2.2.2.91-1), logrotate, cron (>= 3.0pl1-42), exim4 | mail-transport-agent, apache2 | httpd, ucf (>= 0.28), pwgen, adduser
+Depends: ${shlibs:Depends}, python (>= 2.2.2.91-1), logrotate, cron (>= 3.0pl1-42), exim4 | mail-transport-agent, apache2 | httpd, ucf (>= 0.28), pwgen, adduser, lsb-base
 Conflicts: suidmanager (<< 0.50), sendmail (<< 8.12.6)
 Suggests: spamassassin, lynx, python2.3-korean-codecs | python2.2-korean-codecs, python-japanese-codecs, listadmin
 Description: Powerful, web-based mailing list manager

Modified: trunk/debian/mailman.init
===================================================================
--- trunk/debian/mailman.init	2006-08-14 17:09:44 UTC (rev 326)
+++ trunk/debian/mailman.init	2006-08-15 11:50:28 UTC (rev 327)
@@ -1,13 +1,9 @@
 #! /bin/sh
 #
-# mailman	starts up the qrunner for mailman
-
-#               Based on skeleton, by those listed below.  Customizations 
-#               done by Tollef Fog Heen <tfheen at debian.org>
+# mailman	starts up the master queue runner for mailman
 #
-#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
-#		Modified for Debian GNU/Linux
-#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+# Based on skeleton originally by Miquel van Smoorenburg and Ian Murdock,
+# customisations by Tollef Fog Heen and Thijs Kinkhorst for Debian.
 #
 ### BEGIN INIT INFO
 # Provides:          mailman-qrunner
@@ -22,15 +18,10 @@
 #                    manage the various message queues within the Mailman
 #                    mailing list manager.
 ### END INIT INFO
-#
-# Version:	@(#)skeleton  1.9.1  08-Apr-2002  miquels at cistron.nl
-#
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/lib/mailman/bin/mailmanctl
 PIDFILE=/var/lib/mailman/data/master-qrunner.pid
-NAME=mailman
-DESC="mailman queue runner"
 
 test -x $DAEMON || exit 0
 
@@ -44,64 +35,64 @@
       install -d -o root -g list -m 2775 /var/lock/mailman
 fi
 
+. /lib/lsb/init-functions
 
-
-
-
-
 case "$1" in
   start)
-        if [ "$(/var/lib/mailman/bin/list_lists -b | grep ^mailman$ )" = "" ]; then
-            echo "Site list for mailman (usually named mailman) missing"
-            echo "Please create it; until then, mailman will refuse to start"
-            exit 0
-        fi
-        $DAEMON -s start
-	;;
+    if [ "$(/var/lib/mailman/bin/list_lists -b | grep ^mailman$ )" = "" ]; then
+        log_warning_msg "Site list for mailman (usually named mailman) missing."
+        log_warning_msg "Please create it; until then, mailman will refuse to start."
+        exit 0;
+    fi
+    log_daemon_msg "Starting Mailman master qrunner" "mailmanctl"
+    if $DAEMON -s -q start; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+    fi
+    ;;
   stop)
-        $DAEMON stop
-	;;
+    log_daemon_msg "Stopping Mailman master qrunner" "mailmanctl"
+    if $DAEMON -q stop; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+    fi
+    ;;
   reload)
-	#
-	#	If the daemon can reload its config files on the fly
-	#	for example by sending it SIGHUP, do it here.
-	#
-	#	If the daemon responds to changes in its config file
-	#	directly anyway, make this a do-nothing entry.
-	#
-	echo -n "Reloading $DESC configuration..."
-	$DAEMON restart
+    log_begin_msg "Reloading Mailman master qrunner configuration"
+    if $DAEMON -q restart; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+    fi
   ;;
   restart|force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
-	PID=`cat $PIDFILE 2>/dev/null` || true
-	echo -n "Restarting $DESC: $NAME"
-        $DAEMON stop
-	if test -n "$PID" && kill -0 $PID 2>/dev/null ; then
-		echo -n "Waiting "
-                for cnt in `seq 1 5`; do
-			sleep 1
-			kill -0 $PID 2>/dev/null || break
-			echo -n "."
-		done;
-		if kill -0 $PID 2>/dev/null ; then
-			echo " Failed"
-		else
-			echo " Done"
-		fi
-	fi
-        $DAEMON start
-	;;
+    PID=`cat $PIDFILE 2>/dev/null` || true
+    log_daemon_msg "Restarting Mailman master qrunner" "mailmanctl"
+    $DAEMON -q stop
+    if test -n "$PID" && kill -0 $PID 2>/dev/null ; then
+        log_action_begin_msg "Waiting"
+        for cnt in `seq 1 5`; do
+            sleep 1
+            kill -0 $PID 2>/dev/null || break
+        done;
+        if kill -0 $PID 2>/dev/null ; then
+            log_action_end_msg 1
+        else
+            log_action_end_msg 0
+        fi
+    fi
+    if $DAEMON -q start; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+    fi
+    ;;
   *)
-	N=/etc/init.d/$NAME
-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
-	exit 1
-	;;
+    echo "Usage: /etc/init.d/mailman {start|stop|restart|reload|force-reload}" >&2
+    exit 1
+    ;;
 esac
 
 exit 0




More information about the Pkg-mailman-hackers mailing list