diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-03-29 08:40:14 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-03-29 08:40:14 +0000 |
commit | 6a47155280e9a5114e7a22c5a92bc05a0e85acd6 (patch) | |
tree | af0de51e88e3a70589cb9cbd11eb36a19d3113a8 /net-dialup/isdn4k-utils/files/isdnlog.initd | |
parent | Moved the gcc34 patch to the gentoo mirrors. (diff) | |
download | historical-6a47155280e9a5114e7a22c5a92bc05a0e85acd6.tar.gz historical-6a47155280e9a5114e7a22c5a92bc05a0e85acd6.tar.bz2 historical-6a47155280e9a5114e7a22c5a92bc05a0e85acd6.zip |
version bump
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-dialup/isdn4k-utils/files/isdnlog.initd')
-rw-r--r-- | net-dialup/isdn4k-utils/files/isdnlog.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-dialup/isdn4k-utils/files/isdnlog.initd b/net-dialup/isdn4k-utils/files/isdnlog.initd new file mode 100644 index 000000000000..555b1816720f --- /dev/null +++ b/net-dialup/isdn4k-utils/files/isdnlog.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/isdnlog.initd,v 1.1 2005/03/29 08:40:14 mrness Exp $ + +opts="start stop" + +depend() { + need isdn +} + +start() { + local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2)) + local CONFIG="/etc/isdn/isdnlog.isdnctrl${CTRL}.options" + [ -e "$CONFIG" ] || CONFIG="/etc/isdn/isdnlog.options.contr${CONTR}" + + if [ ! -e "$CONFIG" ] ; then + eerror "You're missing ${CONFIG}" + return 1 + fi + + ebegin "Starting ISDNLOG for controller #${CONTR}" + start-stop-daemon --start --quiet --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid" \ + --exec /usr/sbin/isdnlog -- ${ISDNLOG_OPTIONS} -f "${CONFIG}" "/dev/isdnctrl${CTRL}" + eend $? +} + +stop() { + local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2)) + ebegin "Stopping ISDNLOG for controller #${CONTR}" + start-stop-daemon --stop --quiet --retry 5 --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid" + eend $? +} |