From 9bd50c0d6ecae04af84288622ac6799e08aa3b4d Mon Sep 17 00:00:00 2001 From: reenoo Date: Tue, 28 May 2002 12:48:05 +0000 Subject: [PATCH] 0.4.3 -> 0.5 merging --- scripts/Makefile.am | 1 + scripts/init-LCDd.debian.in | 52 +++++++++++++++ scripts/init-LCDd.rpm.in | 108 +++++++++++++++++++++++++++++++ scripts/init-lcdproc.debian.in | 58 +++++++++++++++++ scripts/init-lcdproc.rpm.in | 114 +++++++++++++++++++++++++++++++++ scripts/lcdproc.conf | 9 +++ 6 files changed, 342 insertions(+) create mode 100644 scripts/Makefile.am create mode 100644 scripts/init-LCDd.debian.in create mode 100644 scripts/init-LCDd.rpm.in create mode 100644 scripts/init-lcdproc.debian.in create mode 100644 scripts/init-lcdproc.rpm.in create mode 100644 scripts/lcdproc.conf diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 0000000..06934a8 --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = init-LCDd.debian.in init-LCDd.rpm.in init-lcdproc.debian.in init-lcdproc.rpm.in lcdproc.conf diff --git a/scripts/init-LCDd.debian.in b/scripts/init-LCDd.debian.in new file mode 100644 index 0000000..47a6fbe --- /dev/null +++ b/scripts/init-LCDd.debian.in @@ -0,0 +1,52 @@ +#!/bin/sh -e +# +# lcdd Startup script for LCDd +# +# Modified for autoconf +# by Rene Wagner +# Modified for lcd-server +# by Joris Robijn +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: $Id$ + +DESC="LCDd @VERSION@" + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +etc=@sysconfdir@ + +LCDd=${sbindir}/LCDd +configfile=${etc}/LCDd.conf + +test -x ${LCDd} || exit 0 + +case "$1" in +start) + printf "Starting $DESC:" + start-stop-daemon --start --quiet --background --exec ${LCDd} -- -s -f -c ${configfile} + printf " LCDd" + printf ".\n" + ;; +stop) + printf "Stopping $DESC:" + start-stop-daemon --stop --oknodo --quiet --exec ${LCDd} + printf " LCDd" + printf ".\n" + ;; +restart | force-restart) + $0 stop + sleep 1 + $0 start + ;; +*) + printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/scripts/init-LCDd.rpm.in b/scripts/init-LCDd.rpm.in new file mode 100644 index 0000000..38f7241 --- /dev/null +++ b/scripts/init-LCDd.rpm.in @@ -0,0 +1,108 @@ +#!/bin/sh +# This is the LCDd init-script for RPM based (RedHat, Mandrake) systems +# +# Copyright (C) 2001 Rene Wagner +# 2001 Guillaume Filion +# +# This script is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# any later version. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# +# +# chkconfig: 345 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 +# pidfile: /var/run/LCDd.pid +# config: @sysconfdir@/LCDd.conf + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +if [ ${NETWORKING} = "no" ]; then + exit 0 +fi + +RETVAL=0 + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +etc=@sysconfdir@ + +LCDd=${sbindir}/LCDd +configfile=${etc}/LCDd.conf + +[ -x ${LCDd} ] || exit 0 + +start() { + echo -n "Starting up LCDd: " + daemon ${LCDd} -c ${configfile} + + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/LCDd + echo +} + +stop() { + echo -n "Shutting down LCDd: " + killproc LCDd + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/LCDd + echo +} + +dostatus() { + status LCDd + RETVAL=$? +} + +restart() { + stop + start + RETVAL=$? +} + +condrestart() { + [ -e /var/lock/subsys/LCDd ] && restart || : +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + dostatus + ;; + restart) + restart + ;; + condrestart) + condrestart + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/scripts/init-lcdproc.debian.in b/scripts/init-lcdproc.debian.in new file mode 100644 index 0000000..f3a2fba --- /dev/null +++ b/scripts/init-lcdproc.debian.in @@ -0,0 +1,58 @@ +#!/bin/sh -e +# +# lcdd Startup script for lcdproc +# +# Modified for autoconf +# by Rene Wagner +# Modified for lcd-server +# by Joris Robijn +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: $Id$ + +DESC="lcdproc @VERSION@" + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +etc=@sysconfdir@ + +lcdproc=${bindir}/lcdproc + +test -x ${lcdproc} || exit 0 + +if [ -f /etc/lcdproc.conf ]; then + . /etc/lcdproc.conf +else + SCREENS="C X" +fi + + +case "$1" in +start) + printf "Starting $DESC:" + start-stop-daemon --start --quiet --background --exec ${lcdproc} -- $SCREENS + printf " lcdproc" + printf ".\n" + ;; +stop) + printf "Stopping $DESC:" + start-stop-daemon --stop --oknodo --quiet --exec ${lcdproc} + printf " lcdproc" + printf ".\n" + ;; +restart | force-reload) + $0 stop + sleep 1 + $0 start + ;; +*) + printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/scripts/init-lcdproc.rpm.in b/scripts/init-lcdproc.rpm.in new file mode 100644 index 0000000..580c6d9 --- /dev/null +++ b/scripts/init-lcdproc.rpm.in @@ -0,0 +1,114 @@ +#!/bin/sh +# This is the lcdproc init-script for RPM based (RedHat, Mandrake) systems +# +# Copyright (C) 2001 Rene Wagner +# 2001 Guillaume Filion +# +# This script is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# any later version. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# +# +# chkconfig: 345 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 +# pidfile: /var/run/lcdproc.pid +# config: /etc/sysconfig/lcdproc + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +if [ ${NETWORKING} = "no" ]; then + exit 0 +fi + +RETVAL=0 + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +etc=@sysconfdir@ + +lcdproc=${bindir}/lcdproc + +[ -x ${lcdproc} ] || exit 0 + +if [ -f /etc/lcdproc.conf ]; then + . /etc/lcdproc.conf +else + SCREENS="C X" +fi + + +start() { + echo -n "Starting up lcdproc: " + daemon ${lcdproc} -d $SCREENS + + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lcdproc + echo +} + +stop() { + echo -n "Shutting down lcdproc: " + killproc lcdproc + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lcdproc + echo +} + +dostatus() { + status lcdproc + RETVAL=$? +} + +restart() { + stop + start + RETVAL=$? +} + +condrestart() { + [ -e /var/lock/subsys/lcdproc ] && restart || : +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + dostatus + ;; + restart) + restart + ;; + condrestart) + condrestart + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/scripts/lcdproc.conf b/scripts/lcdproc.conf new file mode 100644 index 0000000..f71dfcb --- /dev/null +++ b/scripts/lcdproc.conf @@ -0,0 +1,9 @@ +# /etc/lcdproc.conf +# +# Configuration file of the main LCDproc client "lcdproc" +# NOTE: The configuration file of LCDd is /etc/LCDd.conf + +# Set SCREENS to the screens you want lcdproc to send to LCDd +# lcdproc --help will give you a list of the screens available + +SCREENS="C X"