[SVN] r488 - in /trunk/cyrus-imapd-2.2.13/debian: changelog cyrus-common-2.2.cyrus2.2.init

debian at incase.de debian at incase.de
Sun Jun 18 21:00:35 UTC 2006


Author: sven
Date: Sun Jun 18 23:00:34 2006
New Revision: 488

URL: https://mail.incase.de/viewcvs?rev=488&root=cyrus22&view=rev
Log:
Change the init script to actuall print some information when called with the "status" argument

Modified:
    trunk/cyrus-imapd-2.2.13/debian/changelog
    trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init

Modified: trunk/cyrus-imapd-2.2.13/debian/changelog
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/changelog?rev=488&root=cyrus22&r1=487&r2=488&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/changelog (original)
+++ trunk/cyrus-imapd-2.2.13/debian/changelog Sun Jun 18 23:00:34 2006
@@ -23,13 +23,15 @@
   * Add upstream patch to fix a documentation error in imapoptions
   * Add patch to fix some compiler warnings about casts from pointer to
     integer of different size
+  * Change the init script to actuall print some information when called with
+    the "status" argument
 
   [ Benjamin Seidenberg ]
   * Fix typos in UPGRADE.Debian (Closes: #368675)
   * Fix link in doc/html/readme.html (Closes: #368676)
   * Add upstream patch to fix POP locking when reconstructing
 
- -- Sven Mueller <debian at incase.de>  Thu,  8 Jun 2006 17:41:45 +0200
+ -- Sven Mueller <debian at incase.de>  Sun, 18 Jun 2006 22:59:31 +0200
 
 cyrus-imapd-2.2 (2.2.13-3) unstable; urgency=high
 

Modified: trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init?rev=488&root=cyrus22&r1=487&r2=488&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init (original)
+++ trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init Sun Jun 18 23:00:34 2006
@@ -81,6 +81,11 @@
 }
 
 check_status () {
+	if [ "$1" = "verbose" ]; then
+		PRINTIT=echo
+	else
+		PRINTIT=true 
+	fi
 	if [ ! -f /var/run/${NAME}.pid ]; then
 		# using [c] in the grep avoids catching the grep 
 		# process itself
@@ -90,19 +95,23 @@
 			# do this, reconstruct the PID file here.
 			pidof /usr/sbin/cyrmaster > /dev/null 2>&1 \
 			&& pidof /usr/sbin/cyrmaster > /var/run/${NAME}.pid
+			${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
 			return 0
 		fi
 	fi	
 	if [ -s /var/run/${NAME}.pid ] && kill -0 `cat /var/run/${NAME}.pid` > /dev/null 2>&1; then
+		${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
 		return 0
 	else
 		# the PID file might simply not match the cyrmaster process.
 		if pidof /usr/sbin/cyrmaster > /dev/null 2>&1 ; then
 			# go ahead and fix it
 			pidof /usr/sbin/cyrmaster > /var/run/${NAME}.pid
+			${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
 			return 0
 		else
 			# no process and/or no PID file, return failure
+			${PRINTIT} "cyrmaster not running with"
 			return 1
 		fi
 	fi
@@ -208,7 +217,7 @@
 	exec $0 start
 	;;
   status)
-  	check_status
+  	check_status verbose
 	exit $?
 	;;
   try-restart)



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list