diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-27 18:49:01 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-27 18:49:01 +0000 |
commit | d44e9181f03e3d3bbf7d7fb326f98408397e79da (patch) | |
tree | 1d299f0916d91c172a75bf9e790ecf2500b7d0fa | |
parent | df2f49ac97f7c6cfa6f0dae9c245310c466e2910 (diff) |
Merged revisions 2342 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r2342 | russell | 2007-03-27 13:48:23 -0500 (Tue, 27 Mar 2007) | 5 lines
When debug is enabled, ensure that "debug=1" gets passed to the zaptel module,
and not just the hardware modules. Also, run "ztcfg -s" at the beginning of
the "stop" action of the script.
(issue #7409, PCadach and tzafrir)
........
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2343 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | zaptel.init | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/zaptel.init b/zaptel.init index fd7e6d5..c8bfad1 100644 --- a/zaptel.init +++ b/zaptel.init @@ -10,6 +10,8 @@ initdir=/etc/init.d +ZTCFG=/sbin/ztcfg + # # Determine which kind of configuration we're using # @@ -112,7 +114,7 @@ fix_asterisbank_sync() { # Check that telephony is up. [ "${TELEPHONY}" = "yes" ] || exit 0 -[ -f /sbin/ztcfg ] || exit 0 +[ -f $ZTCFG ] || exit 0 [ -f /etc/zaptel.conf ] || exit 0 @@ -131,10 +133,10 @@ case "$1" in rmmod audio >& /dev/null if [ $system = debian ]; then echo -n "Loading zaptel framework: " - modprobe zaptel >& /dev/null && echo -n "done" + modprobe zaptel ${ARGS} >& /dev/null && echo -n "done" echo "." elif [ $system = redhat ]; then - action "Loading zaptel framework: " modprobe zaptel + action "Loading zaptel framework: " modprobe zaptel ${ARGS} fi echo -n "Waiting for zap to come online..." TMOUT=10 # max secs to wait @@ -166,10 +168,10 @@ case "$1" in fi if [ $system = debian ]; then echo -n "Running ztcfg: " - /sbin/ztcfg >& /dev/null && echo -n "done" + $ZTCFG >& /dev/null && echo -n "done" echo "." elif [ $system = redhat ]; then - action "Running ztcfg: " /sbin/ztcfg + action "Running ztcfg: " $ZTCFG fi RETVAL=$? @@ -177,6 +179,7 @@ case "$1" in ;; stop) # Unload drivers + $ZTCFG -s echo -n "Unloading zaptel hardware drivers:" for x in $RMODULES; do if rmmod ${x} >& /dev/null; then @@ -203,10 +206,10 @@ case "$1" in reload) if [ $system = debian ]; then echo -n "Reloading ztcfg: " - /sbin/ztcfg >& /dev/null && echo -n "done" + $ZTCFG >& /dev/null && echo -n "done" echo "." elif [ $system = redhat ]; then - action "Reloading ztcfg: " /sbin/ztcfg + action "Reloading ztcfg: " $ZTCFG fi RETVAL=$? ;; |