diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-27 18:48:23 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-03-27 18:48:23 +0000 |
commit | f9eab280f292261feb4dd9a7b61969f6fb92d7b4 (patch) | |
tree | 0b802ae5f55ce1533b129f841a0d8784f7fa2830 /zaptel.init | |
parent | 3b5e7c2c8341b33efeb5e30d630ba13051c375e5 (diff) |
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.2@2342 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.init')
-rw-r--r-- | zaptel.init | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/zaptel.init b/zaptel.init index 95e4561..ad6674d 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 @@ -165,10 +167,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=$? @@ -176,6 +178,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 @@ -202,10 +205,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=$? ;; |