Bug#508137: Please use LSB functions in init script

2008-12-12 Thread Laurent Bigonville
tags 508137 + patch
thanks

Here a patch that should be ok

Laurent Bigonville
diff -u oidentd-2.0.8/debian/init oidentd-2.0.8/debian/init
--- oidentd-2.0.8/debian/init
+++ oidentd-2.0.8/debian/init
@@ -20,6 +20,8 @@
 OIDENT_GROUP=nogroup
 test -f /etc/default/oidentd  . /etc/default/oidentd
 
+. /lib/lsb/init-functions
+
 if [ ${OIDENT_BEHIND_PROXY} = yes ]; then
   # If we have a default router, then allow it to proxy auth requests to us
   GATEWAY=`netstat -nr | awk '/^0.0.0.0/{print $2;}'`
@@ -33,27 +35,24 @@
 
 case $1 in
 	start)
-		echo -n Starting ident daemon:
-		echo -n  oidentd
-		start-stop-daemon --start --quiet --exec ${OIDENTD} -- ${OPTIONS}
-		echo .
+		log_daemon_msg Starting ident daemon oidentd
+		start-stop-daemon --start --quiet --oknodo --exec ${OIDENTD} -- ${OPTIONS}
+		log_end_msg $?
 		;;
 	stop)
-		echo -n Stopping ident daemon:
-		echo -n  oidentd
-		start-stop-daemon --stop --quiet --exec ${OIDENTD} -- ${OPTIONS}
-		echo .
+		log_daemon_msg Stopping ident daemon oidentd
+		start-stop-daemon --stop --quiet --oknodo --exec ${OIDENTD} -- ${OPTIONS}
+		log_end_msg $?
 		;;
 	reload|restart|force-reload)
-		echo -n Restarting ident daemon:
-		echo -n  oidentd
+		log_daemon_msg Restarting ident daemon oidentd
 		start-stop-daemon --stop --quiet --exec ${OIDENTD} -- ${OPTIONS}
 		sleep 2
 		start-stop-daemon --start --quiet --exec ${OIDENTD} -- ${OPTIONS}
-		echo .
+		log_end_msg $?
 		;;
 	*)
-		echo Usage: $0 {start|stop|restart|reload|force-reload}
+		log_success_msg Usage: $0 {start|stop|restart|reload|force-reload}
 		exit 1
 		;;
 esac


Bug#508137: Please use LSB functions in init script

2008-12-08 Thread Laurent Bigonville
Package: oidentd
Version: 2.0.8-1.2
Severity: minor

Hi,

Could you please use LSB functions to output status in the init script.

Thanks

Laurent Bigonville



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]