Package: cntlm
Version: 0.92.3-1
Severity: normal
Tags: patch

Init script could use LSB logging functions to produce consistent
output.
--- cntlm-0.92.3/debian/cntlm.init.orig	2013-11-28 09:52:38.000000000 +0100
+++ cntlm-0.92.3/debian/cntlm.init	2013-11-28 11:23:06.983239410 +0100
@@ -44,7 +44,7 @@
 PIDDIR=`dirname $PIDFILE 2>/dev/null`
 
 start() {
-	echo -n "Starting $DESC: "
+	log_daemon_msg "Starting $DESC" "$NAME"
 
 	if [ -n "$PIDDIR" -a ! -d "$PIDDIR" ]; then
 		mkdir -p "$PIDDIR" 2>/dev/null
@@ -53,21 +53,15 @@
 	fi
 
 	start-stop-daemon --oknodo --quiet --start --pidfile $PIDFILE --name $NAME --startas $DAEMON -- $DAEMON_OPTS 2>/dev/null
-	if [ $? -eq 0 ]; then
-		echo "$NAME."
-	else
-		echo "failed!"
-	fi
+
+	log_end_msg $?
 }
 
 stop() {
-	echo -n "Stopping $DESC: "
+	log_daemon_msg "Stopping $DESC" "$NAME"
 	start-stop-daemon --oknodo --quiet --stop --retry -HUP/$TIMEOUT/-HUP/2/forever/-KILL --pidfile $PIDFILE --name $NAME
-	if [ $? -eq 0 ]; then
-		echo "$NAME."
-	else
-		echo "failed!"
-	fi
+
+	log_end_msg $?
 }
 
 case "$1" in

Reply via email to