[Pkg-cups-devel] r782 - in cupsys/trunk: . debian

Martin Pitt mpitt at alioth.debian.org
Thu Jun 12 17:47:37 UTC 2008


Author: mpitt
Date: Thu Jun 12 17:47:37 2008
New Revision: 782

Log:
* debian/cups.init.d: Restart xprint on start/stop/reload. (Closes: #285332)

Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/cups.init.d

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Thu Jun 12 17:47:37 2008
@@ -1,3 +1,9 @@
+cups (1.3.7-8) UNRELEASED; urgency=low
+
+  * debian/cups.init.d: Restart xprint on start/stop/reload. (Closes: #285332)
+
+ -- Martin Pitt <mpitt at debian.org>  Tue, 10 Jun 2008 21:46:49 +0200
+
 cups (1.3.7-7) unstable; urgency=low
 
   * Provide transitional cupsys-common package, to ease apt-get dist-upgrade.

Modified: cupsys/trunk/debian/cups.init.d
==============================================================================
--- cupsys/trunk/debian/cups.init.d	(original)
+++ cupsys/trunk/debian/cups.init.d	Thu Jun 12 17:47:37 2008
@@ -22,8 +22,6 @@
 
 test -f $DAEMON || exit 0
 
-set -e
-
 if [ -r /etc/default/cups ]; then
   . /etc/default/cups
 fi
@@ -36,6 +34,12 @@
     export TZ
 fi
 
+restart_xprint() {
+    if [ -n "$success" ] && [ -x /etc/init.d/xprint ]; then
+        invoke-rc.d xprint force-reload || true
+    fi
+}
+
 case "$1" in
   start)
 	log_begin_msg "Starting $DESC: $NAME"
@@ -49,26 +53,30 @@
 	  modprobe -q ppdev || true
 	fi
 
-	start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON
+	start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON && success=1
 
 	log_end_msg $?
+	restart_xprint
 	;;
   stop)
 	log_begin_msg "Stopping $DESC: $NAME"
-	start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME
+	start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME && success=1
 	log_end_msg $?
+	restart_xprint
 	;;
   reload|force-reload)
        log_begin_msg "Reloading $DESC: $NAME"
-       start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1 && success=1
        log_end_msg $?
+	restart_xprint
        ;;
   restart)
 	log_begin_msg "Restarting $DESC: $NAME"
 	if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then
-		start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON
+		start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON && success=1
 	fi
 	log_end_msg $?
+	restart_xprint
 	;;
   status)
 	echo -n "Status of $DESC: "



More information about the Pkg-cups-devel mailing list