]> git.pld-linux.org Git - packages/dahdi-tools.git/commitdiff
- added
authoraredridel <aredridel@pld-linux.org>
Wed, 24 Dec 2008 21:42:04 +0000 (21:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dahdi.init -> 1.1
    dahdi.sysconfig -> 1.1

dahdi.init [new file with mode: 0644]
dahdi.sysconfig [new file with mode: 0644]

diff --git a/dahdi.init b/dahdi.init
new file mode 100644 (file)
index 0000000..8377f7c
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# dahdi        dahdi modules
+#
+# chkconfig:   345 85 15
+# description: DAHDI is a series of telephony interface devices often \
+#   used with Asterisk
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/dahdi ] && . /etc/sysconfig/dahdi
+
+start() {
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/dahdi ]; then
+               msg_starting dahdi
+               busy
+               for mod in $ZAP_MODULES; do
+                       modprobe $mod
+               done
+               sleep 2
+               /sbin/ztcfg
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dahdi
+               ok
+       else
+               msg_already_running dahdi
+       fi
+}
+
+stop() {
+       # Stop daemons.
+       if [ -f /var/lock/subsys/dahdi ]; then
+               msg_stopping dahdi
+               busy
+               for mod in $ZAP_MODULES; do
+                       if test x$mod != xdahdi; then
+                               rmmod $mod
+                       fi
+               done
+               rmmod dahdi
+               rm -f /var/lock/subsys/dahdi >/dev/null 2>&1
+               ok
+       else
+               msg_not_running dahdi
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  status)
+       RETVAL=0
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  reload|force-reload|graceful)
+       if [ -f /var/lock/subsys/dahdi ]; then
+               /sbin/ztcfg
+               RETVAL=$?
+       else
+               msg_not_running dahdi
+               RETVAL=7
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
+       exit 3
+       ;;
+esac
+
+exit $RETVAL
diff --git a/dahdi.sysconfig b/dahdi.sysconfig
new file mode 100644 (file)
index 0000000..2807993
--- /dev/null
@@ -0,0 +1,2 @@
+# Modules to load
+ZAP_MODULES="dahdi wcfxo"
This page took 0.05624 seconds and 4 git commands to generate.