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 2009-04-14 16:15:46.000000000 +0200
@@ -1,10 +1,18 @@
#! /bin/sh
+#
+# chkconfig: - 70 21
+# description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \
+# Apart from the main client lcdproc(1) there are various clients. \
+# See http://lcdproc.omnipotent.net for details.
+# processname: LCDd
+#
+# config: /etc/sysconfig/lcdproc/LCDd.conf
-#### BEGIN INIT INFO
+### BEGIN INIT INFO
# Provides: LCDd
# Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs
-# Default-Start: 2 3 4 5
+# Default-Start:
# Default-Stop: S 0 1 6
# Short-Description: LCDproc Server Daemon
# Description: LSB init script for LCDd, the display
@@ -12,57 +20,62 @@
### END INIT INFO
-# local variables
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-etc=@sysconfdir@
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-NAME=LCDd
-DAEMON=${sbindir}/$NAME
-DESC="LCDproc display server daemon"
-DEFAULTS=/etc/default/$NAME
-START=yes
-
-# Source defaults file; edit that file to configure this script.
-if [ -e "${DEFAULTS}" ]; then
- . "${DEFAULTS}"
-fi
+prog=LCDd
+lockfile=/var/lock/subsys/$prog
+configfile=@sysconfdir@/$prog.conf
+RETVAL=0
+
-# If we're not to start the daemon, simply exit
-if [ "${START}" != "yes" ]; then
- exit 0
+# load LSB 3.x init functions
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
fi
-# installation check
-test -x $DAEMON || exit 5
+# Source function library.
+if [ -e /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+fi
-# load LSB 3.x init functions
-. /lib/lsb/init-functions
+# check that non-default config file exists.
+ [ -f $configfile ] || exit 6
case "$1" in
start)
- log_daemon_msg "Starting $DESC" "$NAME"
- start_daemon $DAEMON $OPTIONS
- log_end_msg $?
+ echo -n $"Starting $prog: "
+ daemon $prog -c $configfile
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch $lockfile
+ return $RETVAL
;;
stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- killproc $DAEMON
- log_end_msg $?
- ;;
- restart|reload|force-reload)
- $0 stop
- sleep 1
- $0 start
+ echo -n $"Shutting down $prog: "
+ killproc $prog
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
+ return $RETVAL
+ ;;
+ status)
+ status $prog
+ ;;
+ restart|force-reload)
+ stop
+ start
+ ;;
+ try-restart|condrestart)
+ if [ -f $lockfile ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ exit 3
;;
*)
- echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
- ;;
esac
-exit 0
+exit $RETVAL
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 2009-04-14 16:16:19.000000000 +0200
@@ -1,10 +1,19 @@
#! /bin/sh
+#
+# chkconfig: - 71 20
+# description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \
+# Apart from the main client lcdproc(1) there are various clients. \
+# See http://lcdproc.omnipotent.net for details.
+# processname: lcdproc
+#
+# config: /etc/sysconfig/lcdproc/lcdproc.conf
-#### BEGIN INIT INFO
+### BEGIN INIT INFO
# Provides: lcdproc
# Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs
-# Default-Start: 2 3 4 5
+# Should-Start: LCDd
+# Default-Start:
# Default-Stop: S 0 1 6
# Short-Description: LCDproc system status information viewer
# Description: LSB init script for lcdproc, the system
@@ -12,57 +21,60 @@
### END INIT INFO
-# local variables
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-etc=@sysconfdir@
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-NAME=lcdproc
-DAEMON=${bindir}/$NAME
-DESC="LCDproc system status monitor"
-DEFAULTS=/etc/default/$NAME
-START=yes
-
-# Source defaults file; edit that file to configure this script.
-if [ -e "${DEFAULTS}" ]; then
- . "${DEFAULTS}"
-fi
+prog=lcdproc
+lockfile=/var/lock/subsys/$prog
+configfile=@sysconfdir@/$prog.conf
+RETVAL=0
-# If we're not to start the daemon, simply exit
-if [ "${START}" != "yes" ]; then
- exit 0
+# load LSB 3.x init functions
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
fi
-# installation check
-test -x $DAEMON || exit 5
-
-# load LSB 3.x init functions
-. /lib/lsb/init-functions
+# Source function library.
+if [ -e /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+fi
+# check that non-default config file exists.
+ [ -f $configfile ] || exit 6
case "$1" in
start)
- log_daemon_msg "Starting $DESC" "$NAME"
- start_daemon $DAEMON $OPTIONS
- log_end_msg $?
+ echo -n $"Starting $prog: "
+ daemon $prog -c $configfile
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch $lockfile
+ return $RETVAL
;;
stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- killproc $DAEMON
- log_end_msg $?
- ;;
- restart|reload|force-reload)
- $0 stop
- sleep 1
- $0 start
+ echo -n $"Shutting down $prog: "
+ killproc $prog
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
+ return $RETVAL
+ ;;
+ status)
+ status $prog
+ ;;
+ restart|force-reload)
+ stop
+ start
+ ;;
+ try-restart|condrestart)
+ if [ -f $lockfile ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ exit 3
;;
*)
- echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
- ;;
esac
-exit 0
+exit $RETVAL