fix LSB init headers; add pidfile & configfile handling to debian init scripts

This commit is contained in:
marschap
2008-05-02 11:10:28 +00:00
parent 2c3d3fd60b
commit e40175b3c0
19 changed files with 108 additions and 27 deletions
+1
View File
@@ -47,6 +47,7 @@ v.0.5dev (ongoing development)
* hd44780 driver: "euro" character mapping table (Markus Dolze) * hd44780 driver: "euro" character mapping table (Markus Dolze)
* CwLnx driver: support for CW12832 * CwLnx driver: support for CW12832
+ new driver mx5000 for Logitech MX5000 keyboards (Christian Jodar) + new driver mx5000 for Logitech MX5000 keyboards (Christian Jodar)
* update debian inits scripts to allow multiple instances of clients
v.0.5.2 v.0.5.2
* fix switching on/off the Load screen in lcdproc client using the menu * fix switching on/off the Load screen in lcdproc client using the menu
+1 -1
View File
@@ -4,7 +4,7 @@ Priority: extra
Maintainer: Jose Luis Tallon <jltallon@adv-solutions.net> Maintainer: Jose Luis Tallon <jltallon@adv-solutions.net>
Build-Depends: debhelper (>= 5.0.0), pkg-config, xmlto, libncurses5-dev, libusb-dev (>= 0.1.8), libsvga1-dev, libxosd-dev Build-Depends: debhelper (>= 5.0.0), pkg-config, xmlto, libncurses5-dev, libusb-dev (>= 0.1.8), libsvga1-dev, libxosd-dev
Uploaders: Jonathan Oxer <jon@debian.org> Uploaders: Jonathan Oxer <jon@debian.org>
Standards-Version: 3.7.2.0 Standards-Version: 3.7.3
Package: lcdproc Package: lcdproc
Architecture: any Architecture: any
+4 -1
View File
@@ -3,7 +3,10 @@
# shall LCDd be started (yes/no) # shall LCDd be started (yes/no)
START=no START=no
# config file
#CONFIGFILE=/etc/lcdproc/LCDd.conf
# options for LCDd startup # options for LCDd startup
OPTIONS="-c /etc/lcdproc/LCDd.conf" OPTIONS=""
# EOF # EOF
+18 -2
View File
@@ -1,11 +1,12 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: LCDd # Provides: LCDd
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: udev
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: 0 1 6
# Short-Description: LCDproc Server Daemon # Short-Description: LCDproc Server Daemon
# Description: Debian init script for LCDd, the display # Description: Debian init script for LCDd, the display
# server daemon in the LCDproc suite # server daemon in the LCDproc suite
@@ -19,6 +20,9 @@ NAME=${NAME:-LCDd}
DAEMON=/usr/sbin/LCDd DAEMON=/usr/sbin/LCDd
DESC="LCDproc display server daemon" DESC="LCDproc display server daemon"
DEFAULTS=/etc/default/$NAME DEFAULTS=/etc/default/$NAME
CONFIGFILE=/etc/lcdproc/$NAME.conf
PIDFILE=/var/run/$NAME.pid
OPTIONS=""
START=yes START=yes
# Source defaults file; edit that file to configure this script. # Source defaults file; edit that file to configure this script.
@@ -26,6 +30,18 @@ if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}" . "${DEFAULTS}"
fi fi
# try to get PID file name from config file (not used yet)
if [ -f "${CONFIGFILE:=/etc/lcdproc/$NAME.conf}" ]; then
PIDFILE=`grep -i '^[:space:]*PidFile[:space:]*=' ${CONFIGFILE} \
| head -n1 \
| cut -d= -f2- \
| sed -e 's,^[:space:]*\(.*\)[:space:]*$,\1,'`
OPTIONS="${OPTIONS} -c ${CONFIGFILE}"
fi
# if necessary set default PID file name (not used yet)
PIDFILE=${PIDFILE:-/var/run/$NAME.pid}
# If we're not to start the daemon, simply exit # If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then if [ "${START}" != "yes" ]; then
exit 0 exit 0
+3
View File
@@ -3,6 +3,9 @@
# shall lcdproc be started (yes/no) # shall lcdproc be started (yes/no)
START=no START=no
# config file
#CONFIGFILE=/etc/lcdproc/lcdproc.conf
# options for lcdproc startup # options for lcdproc startup
#OPTIONS="C G" #OPTIONS="C G"
+20 -4
View File
@@ -1,11 +1,12 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdproc # Provides: lcdproc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: 0 1 6
# Short-Description: LCDproc system status information viewer # Short-Description: LCDproc system status information viewer
# Description: Debian init script for lcdproc, the system # Description: Debian init script for lcdproc, the system
# status information viewer in the LCDproc suite # status information viewer in the LCDproc suite
@@ -19,6 +20,9 @@ NAME=${NAME:-lcdproc}
DAEMON=/usr/bin/lcdproc DAEMON=/usr/bin/lcdproc
DESC="LCDproc system status monitor" DESC="LCDproc system status monitor"
DEFAULTS=/etc/default/$NAME DEFAULTS=/etc/default/$NAME
CONFIGFILE=/etc/lcdproc/$NAME.conf
PIDFILE=/var/run/$NAME.pid
OPTIONS=""
START=yes START=yes
# Source defaults file; edit that file to configure this script. # Source defaults file; edit that file to configure this script.
@@ -26,6 +30,18 @@ if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}" . "${DEFAULTS}"
fi fi
# try to get PID file name from config file
if [ -f "${CONFIGFILE:=/etc/lcdproc/$NAME.conf}" ]; then
PIDFILE=`grep -i '^[:space:]*PidFile[:space:]*=' ${CONFIGFILE} \
| head -n1 \
| cut -d= -f2- \
| sed -e 's,^[:space:]*\(.*\)[:space:]*$,\1,'`
OPTIONS="${OPTIONS} -c ${CONFIGFILE}"
fi
# if necessary set default PID file name
PIDFILE=${PIDFILE:-/var/run/$NAME.pid}
# If we're not to start the daemon, simply exit # If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then if [ "${START}" != "yes" ]; then
exit 0 exit 0
@@ -41,12 +57,12 @@ test -x $DAEMON || exit 5
case "$1" in case "$1" in
start) start)
log_daemon_msg "Starting $DESC" "$NAME" log_daemon_msg "Starting $DESC" "$NAME"
start_daemon $DAEMON $OPTIONS start_daemon -p $PIDFILE $DAEMON $OPTIONS
log_end_msg $? log_end_msg $?
;; ;;
stop) stop)
log_daemon_msg "Stopping $DESC" "$NAME" log_daemon_msg "Stopping $DESC" "$NAME"
killproc $DAEMON killproc -p $PIDFILE $DAEMON
log_end_msg $? log_end_msg $?
;; ;;
restart|reload|force-reload) restart|reload|force-reload)
+3
View File
@@ -3,6 +3,9 @@
# shall lcdexec be started (yes/no) # shall lcdexec be started (yes/no)
START=no START=no
# config file
#CONFIGFILE=/etc/lcdproc/lcdexec.conf
# options for lcdexec startup # options for lcdexec startup
#OPTIONS="" #OPTIONS=""
+20 -4
View File
@@ -1,11 +1,12 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdexec # Provides: lcdexec
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: 0 1 6
# Short-Description: LCDproc program starter from the LCDd menu # Short-Description: LCDproc program starter from the LCDd menu
# Description: Debian init script for lcdexec, the client to # Description: Debian init script for lcdexec, the client to
# start programs from the LCDd menu in the LCDproc suite # start programs from the LCDd menu in the LCDproc suite
@@ -19,6 +20,9 @@ NAME=${NAME:-lcdexec}
DAEMON=/usr/bin/lcdexec DAEMON=/usr/bin/lcdexec
DESC="LCDproc program starter" DESC="LCDproc program starter"
DEFAULTS=/etc/default/$NAME DEFAULTS=/etc/default/$NAME
CONFIGFILE=/etc/lcdproc/$NAME.conf
PIDFILE=/var/run/$NAME.pid
OPTIONS=""
START=no START=no
# Source defaults file; edit that file to configure this script. # Source defaults file; edit that file to configure this script.
@@ -26,6 +30,18 @@ if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}" . "${DEFAULTS}"
fi fi
# try to get PID file name from config file
if [ -f "${CONFIGFILE:=/etc/lcdproc/$NAME.conf}" ]; then
PIDFILE=`grep -i '^[:space:]*PidFile[:space:]*=' ${CONFIGFILE} \
| head -n1 \
| cut -d= -f2- \
| sed -e 's,^[:space:]*\(.*\)[:space:]*$,\1,'`
OPTIONS="${OPTIONS} -c ${CONFIGFILE}"
fi
# if necessary set default PID file name
PIDFILE=${PIDFILE:-/var/run/$NAME.pid}
# If we're not to start the daemon, simply exit # If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then if [ "${START}" != "yes" ]; then
exit 0 exit 0
@@ -41,12 +57,12 @@ test -x $DAEMON || exit 5
case "$1" in case "$1" in
start) start)
log_daemon_msg "Starting $DESC" "$NAME" log_daemon_msg "Starting $DESC" "$NAME"
start_daemon $DAEMON $OPTIONS start_daemon -p $PIDFILE $DAEMON $OPTIONS
log_end_msg $? log_end_msg $?
;; ;;
stop) stop)
log_daemon_msg "Stopping $DESC" "$NAME" log_daemon_msg "Stopping $DESC" "$NAME"
killproc $DAEMON killproc -p $PIDFILE $DAEMON
log_end_msg $? log_end_msg $?
;; ;;
restart|reload|force-reload) restart|reload|force-reload)
+3
View File
@@ -3,6 +3,9 @@
# shall lcdvc be started (yes/no) # shall lcdvc be started (yes/no)
START=no START=no
# config file
#CONFIGFILE=/etc/lcdproc/lcdvc.conf
# options for lcdvc startup # options for lcdvc startup
#OPTIONS="" #OPTIONS=""
+20 -4
View File
@@ -1,11 +1,12 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdvc # Provides: lcdvc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: 0 1 6
# Short-Description: LCDproc virtual console # Short-Description: LCDproc virtual console
# Description: Debian init script for lcdvc, the virtual # Description: Debian init script for lcdvc, the virtual
# console client in the LCDproc suite # console client in the LCDproc suite
@@ -19,6 +20,9 @@ NAME=${NAME:-lcdvc}
DAEMON=/usr/bin/lcdvc DAEMON=/usr/bin/lcdvc
DESC="LCDproc virtual console" DESC="LCDproc virtual console"
DEFAULTS=/etc/default/$NAME DEFAULTS=/etc/default/$NAME
CONFIGFILE=/etc/lcdproc/$NAME.conf
PIDFILE=/var/run/$NAME.pid
OPTIONS=""
START=no START=no
# Source defaults file; edit that file to configure this script. # Source defaults file; edit that file to configure this script.
@@ -26,6 +30,18 @@ if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}" . "${DEFAULTS}"
fi fi
# try to get PID file name from config file
if [ -f "${CONFIGFILE:=/etc/lcdproc/$NAME.conf}" ]; then
PIDFILE=`grep -i '^[:space:]*PidFile[:space:]*=' ${CONFIGFILE} \
| head -n1 \
| cut -d= -f2- \
| sed -e 's,^[:space:]*\(.*\)[:space:]*$,\1,'`
OPTIONS="${OPTIONS} -c ${CONFIGFILE}"
fi
# if necessary set default PID file name
PIDFILE=${PIDFILE:-/var/run/$NAME.pid}
# If we're not to start the daemon, simply exit # If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then if [ "${START}" != "yes" ]; then
exit 0 exit 0
@@ -41,12 +57,12 @@ test -x $DAEMON || exit 5
case "$1" in case "$1" in
start) start)
log_daemon_msg "Starting $DESC" "$NAME" log_daemon_msg "Starting $DESC" "$NAME"
start_daemon $DAEMON $OPTIONS start_daemon -p $PIDFILE $DAEMON $OPTIONS
log_end_msg $? log_end_msg $?
;; ;;
stop) stop)
log_daemon_msg "Stopping $DESC" "$NAME" log_daemon_msg "Stopping $DESC" "$NAME"
killproc $DAEMON killproc -p $PIDFILE $DAEMON
log_end_msg $? log_end_msg $?
;; ;;
restart|reload|force-reload) restart|reload|force-reload)
+3 -3
View File
@@ -108,10 +108,10 @@ binary-arch: build install
# dh_installemacsen # dh_installemacsen
# dh_installpam # dh_installpam
# dh_installmime # dh_installmime
dh_installinit # for the lcdproc client dh_installinit --update-rcd-params="defaults 21 79" # for the lcdproc client
dh_installinit --name=LCDd dh_installinit --name=LCDd
dh_installinit --name=lcdexec dh_installinit --name=lcdexec --update-rcd-params="defaults 21 79"
dh_installinit --name=lcdvc dh_installinit --name=lcdvc --update-rcd-params="defaults 21 79"
# dh_installcron # dh_installcron
# dh_installinfo # dh_installinfo
dh_installman dh_installman
+2 -1
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: LCDd # Provides: LCDd
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: udev
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: S 0 1 6
# Short-Description: LCDproc Server Daemon # Short-Description: LCDproc Server Daemon
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: LCDd # Provides: LCDd
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
+2 -1
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdexec # Provides: lcdexec
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: S 0 1 6
# Short-Description: LCDproc program starter from the LCDd menu # Short-Description: LCDproc program starter from the LCDd menu
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdexec # Provides: lcdexec
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
+2 -1
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdproc # Provides: lcdproc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: S 0 1 6
# Short-Description: LCDproc system status information viewer # Short-Description: LCDproc system status information viewer
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdproc # Provides: lcdproc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
+2 -1
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdvc # Provides: lcdvc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6 # Default-Stop: S 0 1 6
# Short-Description: LCDproc virtual console # Short-Description: LCDproc virtual console
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
#### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: lcdvc # Provides: lcdvc
# Required-Start: $syslog $local_fs $network $remote_fs # Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs