[Glibc-bsd-commits] r5018 - trunk/freebsd-moused/debian

Guillem Jover guillem at alioth.debian.org
Wed Oct 9 05:52:57 UTC 2013


Author: guillem
Date: 2013-10-09 05:52:57 +0000 (Wed, 09 Oct 2013)
New Revision: 5018

Modified:
   trunk/freebsd-moused/debian/changelog
   trunk/freebsd-moused/debian/init
Log:
Use LSB init reporting functions

Stop setting -e, which does not play nice with them.

Modified: trunk/freebsd-moused/debian/changelog
===================================================================
--- trunk/freebsd-moused/debian/changelog	2013-10-09 05:52:52 UTC (rev 5017)
+++ trunk/freebsd-moused/debian/changelog	2013-10-09 05:52:57 UTC (rev 5018)
@@ -15,6 +15,8 @@
     Thanks to Robert Millan for all the work done on this package.
   * Add an LSB description header to the init script.
   * Improve and extend the package Description.
+  * Use LSB init reporting functions, and stop setting -e, which does not
+    play nice with them.
 
  -- Guillem Jover <guillem at debian.org>  Thu, 30 Apr 2009 20:57:46 +0200
 

Modified: trunk/freebsd-moused/debian/init
===================================================================
--- trunk/freebsd-moused/debian/init	2013-10-09 05:52:52 UTC (rev 5017)
+++ trunk/freebsd-moused/debian/init	2013-10-09 05:52:57 UTC (rev 5018)
@@ -29,21 +29,21 @@
   DAEMON_OPTS="$DAEMON_OPTS -t ${mouse_type}"
 fi
 
-set -e
+. /lib/lsb/init-functions
 
 case "$1" in
   start)
 	if test -z "${mouse_device}" ; then exit 1 ; fi
-	echo -n "Starting $DESC: "
+	log_daemon_msg "Starting $DESC" "$NAME"
 	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON -- $DAEMON_OPTS
-	echo "$NAME."
+	log_end_msg $?
 	;;
   stop)
-	echo -n "Stopping $DESC: "
+	log_daemon_msg "Stopping $DESC" "$NAME"
 	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON
-	echo "$NAME."
+	log_end_msg $?
 	;;
   restart|force-reload)
 	#
@@ -52,13 +52,12 @@
 	#	just the same as "restart".
 	#
 	if test -z "${mouse_device}" ; then exit 1 ; fi
-	echo -n "Restarting $DESC: "
+	log_action_msg "Restarting $DESC"
 	start-stop-daemon --stop --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON
 	sleep 1
 	start-stop-daemon --start --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
-	echo "$NAME."
 	;;
   *)
 	N=/etc/init.d/$NAME




More information about the Glibc-bsd-commits mailing list