Opened 9 years ago

Closed 8 years ago

#3004 closed defect (fixed)

/etc/init.d/renderd has inconsistant output for start/stop vs restart

Reported by: rorym Owned by: mapnik-team@…
Priority: minor Milestone:
Component: mapnik Version:
Keywords: Cc:

Description

I'm running renderd/mod_tile (r21420) on Ubuntu Lucid, build using the debian dpkg-buildpackage.

If you run /etc/init.d/renderd start to start renderd, you get no output. The same happens with stop.

However if you do /etc/init.d/renderd restart you get the familiar "Restarting SERVICE.... [done]" output.

This is internally inconsistant behaviour. The normal debian/ubuntu idea is that restart should be similar to doing a start then a stop. It is strange that you get no output for start or stop, but output for restart. To make it internally consistant, there should be either (a) no output from either or (b) similar output for start, stop and restart.

This is also inconsistant behaviour compared to other debian/ubuntu packages. It's common to have a "Start SERVICE... [done]" output messages. e.g. apache2 does this. Ergo, I suggest making /etc/init.d/renderd output messages on start, stop and restart.

Output for all can be enabled with this patch (which just removes the 'VERBOSE' checks):

Index: debian/renderd.init
===================================================================
--- debian/renderd.init	(revision 21420)
+++ debian/renderd.init	(working copy)
@@ -95,19 +95,19 @@
 
 case "$1" in
   start)
-	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	log_daemon_msg "Starting $DESC" "$NAME"
 	do_start
 	case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
 	esac
 	;;
   stop)
-	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	log_daemon_msg "Stopping $DESC" "$NAME"
 	do_stop
 	case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
 	esac
 	;;
   #reload|force-reload)

Change History (1)

comment:1 Changed 8 years ago by amm

Resolution: fixed
Status: newclosed

Fix commited in r26350

Note: See TracTickets for help on using tickets.