summaryrefslogtreecommitdiff
path: root/dahdi.init
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-29 16:54:13 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-29 16:54:13 +0000
commit5156247998b357c16e8d634f2f938d218ea4cf12 (patch)
tree547f567cb5403cb4a2b7a1ee64e410a4dc5b266a /dahdi.init
parentd371f84fa494d836193410835b5fdc645d50818d (diff)
* dahdi.init: cleanups.
* init.conf: example configuration for the init script. * dahdi.rules: udev rules (still not installed). * Makefile: simplify install of RCCONF . git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4483 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'dahdi.init')
-rwxr-xr-xdahdi.init39
1 files changed, 17 insertions, 22 deletions
diff --git a/dahdi.init b/dahdi.init
index 49120f0..ee0bec2 100755
--- a/dahdi.init
+++ b/dahdi.init
@@ -1,20 +1,19 @@
#!/bin/sh
#
-# zaptel This shell script takes care of loading and unloading \
-# Zapata Telephony interfaces
+# dahdi This shell script takes care of loading and unloading \
+# Dahdi Telephony interfaces
# chkconfig: 2345 9 92
# description: The zapata telephony drivers allow you to use your linux \
# computer to accept incoming data and voice interfaces
#
-# config: /etc/sysconfig/zaptel
+# config: /etc/dahdi/init.conf
initdir=/etc/init.d
-# Don't edit the following values. Edit /etc/sysconfig/zaptel or
-# /etc/defualt/zaptel (depending on your system) instead.
+# Don't edit the following values. Edit /etc/dahdi/init.conf instead.
DAHDI_CFG=/sbin/dahdi_cfg
-DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom zaptel.conf location
+DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom system.conf location
FXOTUNE=/sbin/fxotune
@@ -43,8 +42,7 @@ fi
[ -f /etc/dahdi/init.conf ] && . /etc/dahdi/init.conf
if [ $system = redhat ]; then
- [ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel
- LOCKFILE=/var/lock/subsys/zaptel
+ LOCKFILE=/var/lock/subsys/dahdi
fi
# recursively unload a module and its dependencies, if possible.
@@ -142,8 +140,8 @@ if [ ! -x "$DAHDI_CFG" ]; then
exit 0
fi
-if [ ! -f /etc/zaptel.conf ]; then
- echo "/etc/zaptel.conf not found. Nothing to do."
+if [ ! -f /etc/dahdi/system.conf ]; then
+ echo "/etc/dahdi/system.conf not found. Nothing to do."
exit 0
fi
@@ -153,7 +151,7 @@ RETVAL=0
case "$1" in
start)
# Load drivers
- echo -n "Loading zaptel hardware modules:"
+ echo -n "Loading Dahdi hardware modules:"
for x in $MODULES; do
eval localARGS="\$${x}_ARGS"
if modprobe ${x} ${localARGS} 2> /dev/null; then
@@ -171,12 +169,11 @@ case "$1" in
fi
done
sleep 3 # TODO: remove it
-
- # If you have zaptel-perl, the three below can be replaced with:
+
xpp_startup
-
- if [ ! -e /proc/zaptel/1 ]; then
- echo "No hardware timing source found in /proc/zaptel, loading dahdi_dummy"
+
+ if [ ! -e /proc/dahdi/1 ]; then
+ echo "No hardware timing source found in /proc/dahdi, loading dahdi_dummy"
modprobe dahdi_dahdi_dummy 2> /dev/null
fi
@@ -201,17 +198,15 @@ case "$1" in
stop)
# Unload drivers
#shutdown_dynamic # FIXME: needs test from someone with dynamic spans
- echo -n "Unloading zaptel hardware drivers:"
- unload_module zaptel
+ echo -n "Unloading Dahdi hardware drivers:"
+ unload_module dahdi
RETVAL=$?
echo "."
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
;;
unload)
- # We don't have zaptel helper, so let's not replicate too much code:
- # allow others to use the unload command.
- unload_module zaptel
+ unload_module dahdi
;;
restart|force-reload)
$0 stop
@@ -228,7 +223,7 @@ case "$1" in
RETVAL=$?
;;
*)
- echo "Usage: zaptel {start|stop|restart|reload|unload}"
+ echo "Usage: dahdi {start|stop|restart|reload|unload}"
exit 1
esac