diff -up lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts lcdproc-0.5.2/scripts/init-lcdproc.LSB.in --- lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts 2007-04-14 16:41:20.000000000 +0200 +++ lcdproc-0.5.2/scripts/init-lcdproc.LSB.in 2008-07-08 16:32:30.000000000 +0200 @@ -4,6 +4,7 @@ # Provides: lcdproc # Required-Start: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs +# Should-Start: LCDd # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: LCDproc system status information viewer @@ -23,8 +24,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin NAME=lcdproc DAEMON=${bindir}/$NAME DESC="LCDproc system status monitor" -DEFAULTS=/etc/default/$NAME +DEFAULTS=@sysconfdir@/${NAME} START=yes +RETVAL=0 # Source defaults file; edit that file to configure this script. if [ -e "${DEFAULTS}" ]; then @@ -40,29 +42,39 @@ fi test -x $DAEMON || exit 5 # load LSB 3.x init functions -. /lib/lsb/init-functions +if [ -e /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions +fi + +# Source function library. +if [ -e /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi case "$1" in start) - log_daemon_msg "Starting $DESC" "$NAME" + echo -n $"Starting $DESC $NAME :" start_daemon $DAEMON $OPTIONS - log_end_msg $? + RETVAL=$? + echo ;; stop) - log_daemon_msg "Stopping $DESC" "$NAME" + echo -n $"Stopping $DESC $NAME :" killproc $DAEMON - log_end_msg $? + RETVAL=$? + echo ;; restart|reload|force-reload) $0 stop sleep 1 + RETVAL=0 $0 start ;; *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + echo $"Usage: $0 {start|stop|restart|reload|force-reload}" >&2 exit 2 ;; esac -exit 0 +exit $RETVAL diff -up lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts lcdproc-0.5.2/scripts/init-LCDd.LSB.in --- lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts 2007-04-14 16:41:20.000000000 +0200 +++ lcdproc-0.5.2/scripts/init-LCDd.LSB.in 2008-07-08 16:32:22.000000000 +0200 @@ -4,6 +4,7 @@ # Provides: LCDd # Required-Start: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs +# Should-Start: udev # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: LCDproc Server Daemon @@ -23,8 +24,10 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin NAME=LCDd DAEMON=${sbindir}/$NAME DESC="LCDproc display server daemon" -DEFAULTS=/etc/default/$NAME +DEFAULTS=@sysconfdir@/${NAME} START=yes +RETVAL=0 + # Source defaults file; edit that file to configure this script. if [ -e "${DEFAULTS}" ]; then @@ -40,29 +43,39 @@ fi test -x $DAEMON || exit 5 # load LSB 3.x init functions -. /lib/lsb/init-functions +if [ -e /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions +fi + +# Source function library. +if [ -e /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi case "$1" in start) - log_daemon_msg "Starting $DESC" "$NAME" + echo -n $"Starting $DESC $NAME :" start_daemon $DAEMON $OPTIONS - log_end_msg $? + RETVAL=$? + echo ;; stop) - log_daemon_msg "Stopping $DESC" "$NAME" + echo -n $"Stopping $DESC $NAME :" killproc $DAEMON - log_end_msg $? + RETVAL=$? + echo ;; restart|reload|force-reload) $0 stop sleep 1 + RETVAL=0 $0 start ;; *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + echo $"Usage: $0 {start|stop|restart|reload|force-reload}" >&2 exit 2 ;; esac -exit 0 +exit $RETVAL