diff options
author | Sven Schwyn <gentoo@bitcetera.com> | 2008-12-16 22:03:49 +0000 |
---|---|---|
committer | Sven Schwyn <gentoo@bitcetera.com> | 2008-12-16 22:03:49 +0000 |
commit | 9eaac0668d80c91eee535a3f6bc95eafbe8d4b93 (patch) | |
tree | 3313465f91d3de7d5925931df71a8d8353875bb0 /net-misc/dahdi-tools/files | |
parent | net-misc/callweaver: ebuild improvements and add callweaver to dialout group (diff) | |
download | voip-9eaac0668d80c91eee535a3f6bc95eafbe8d4b93.tar.gz voip-9eaac0668d80c91eee535a3f6bc95eafbe8d4b93.tar.bz2 voip-9eaac0668d80c91eee535a3f6bc95eafbe8d4b93.zip |
net-misc/dahdi-tools: add HPEC enabler to init script
svn path=/trunk/; revision=746
Diffstat (limited to 'net-misc/dahdi-tools/files')
-rw-r--r-- | net-misc/dahdi-tools/files/2.1.0-r1/dahdi.init | 37 | ||||
-rwxr-xr-x | net-misc/dahdi-tools/files/2.1.0/dahdi.init (renamed from net-misc/dahdi-tools/files/dahdi.initd) | 0 |
2 files changed, 37 insertions, 0 deletions
diff --git a/net-misc/dahdi-tools/files/2.1.0-r1/dahdi.init b/net-misc/dahdi-tools/files/2.1.0-r1/dahdi.init new file mode 100644 index 0000000..0c32a1d --- /dev/null +++ b/net-misc/dahdi-tools/files/2.1.0-r1/dahdi.init @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/dahdi/system.conf ]; then + eerror "/etc/dahdi/system.conf not found. Nothing to do." + return 1 + fi + + return 0 +} + +start() { + checkconfig || return 1 + + if [ -x /opt/bin/dahdihpec_enable ]; then + ebegin "Enabling HPEC" + /opt/bin/dahdihpec_enable >/dev/null + eend $? + fi + + ebegin "Starting DAHDI" + /usr/sbin/dahdi_cfg + eend $? +} + +stop() { + ebegin "Stopping DAHDI" + /usr/sbin/dahdi_cfg -s + eend +} diff --git a/net-misc/dahdi-tools/files/dahdi.initd b/net-misc/dahdi-tools/files/2.1.0/dahdi.init index 2c58ca9..2c58ca9 100755 --- a/net-misc/dahdi-tools/files/dahdi.initd +++ b/net-misc/dahdi-tools/files/2.1.0/dahdi.init |