summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/zaptel/files/zaptel.rc6')
-rw-r--r--net-misc/zaptel/files/zaptel.rc651
1 files changed, 51 insertions, 0 deletions
diff --git a/net-misc/zaptel/files/zaptel.rc6 b/net-misc/zaptel/files/zaptel.rc6
new file mode 100644
index 000000000000..085082778970
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel.rc6
@@ -0,0 +1,51 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/files/zaptel.rc6,v 1.1 2004/05/10 01:18:13 stkn Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/zaptel.conf ]; then
+ echo "Please create /etc/zaptel.conf!"
+ return 0
+ fi
+
+ return 1
+}
+
+create_devices() {
+ mkdir -p -m 0775 /dev/zap
+ for i in `seq 1 250`; do
+ mknod /dev/zap/$i c 196 $i
+ done
+ mknod /dev/zap/ctl c 196 0
+ mknod /dev/zap/timer c 196 253
+ mknod /dev/zap/channel c 196 254
+ mknod /dev/zap/pseudo c 196 255
+}
+
+
+start() {
+ checkconfig || exit 1
+
+ if [ ! -d /dev/zap ] && [ "$ZAP_FORCE_CREATE" != "no" ]; then
+ einfo "Creating zaptel device nodes"
+ create_devices
+ fi
+
+ ebegin "Starting zaptel"
+ /sbin/ztcfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping zaptel"
+ /sbin/ztcfg -s
+ eend $?
+}
+
+
+# vim:ts=4