summaryrefslogtreecommitdiff
path: root/live_zap
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-27 20:35:26 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-27 20:35:26 +0000
commit837874b06e56dce6dfdd29b4603dd9005c5dca10 (patch)
tree4899c00f53ed0a4e51320a554e3459abbc6bbf66 /live_zap
parent70efd19bb0dd2ef354b6df4ef28043fecf0ce015 (diff)
* Some extra hooks to echo canceller modules.
* Give harware modules detection^guessing a chance. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3566 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'live_zap')
-rwxr-xr-xlive_zap32
1 files changed, 30 insertions, 2 deletions
diff --git a/live_zap b/live_zap
index 6d57ce0..4f65122 100755
--- a/live_zap
+++ b/live_zap
@@ -13,10 +13,36 @@ PERLLIBDIR=`perl -V:sitelib | cut -d "'" -f 2`
# Manual list of modules. They will be loaded by insmod.
# If reside in a subdir, add it explicitly.
-MODULES_LOAD="zaptel xpp/xpp xpp/xpd_fxs xpp/xpd_fxo xpp/xpp_usb"
+
+MODULES_LOAD="zaptel"
+
+# this one *is* resolved recusively.
+# the only reason to set a different value is if you use hpec / oslec,
+# as Zaptel depends on them.
+REMOVE_MODULES="zaptel"
if [ -r $DESTDIR/live.conf ]; then . $DESTDIR/live.conf; fi
+# Detect the modules used in the system:
+for mod in `xpp/utils/zaptel_modules`; do
+ case "$mod" in
+ xpp_usb)
+ MODULES_LOAD="$MODULES_LOAD xpp/xpp xpp/xpd_fxs"
+ MODULES_LOAD="$MODULES_LOAD xpp/xpd_fxo xpp/xpd_pri"
+ MODULES_LOAD="$MODULES_LOAD xpp/xpp_usb"
+ ;;
+ wctdm24xxp | wct4xxp | wcte12xp | wctc4xp)
+ MODULES_LOAD="$MODULES_LOAD $mod/$mod"
+ ;;
+ wanpipe)
+ : # requires different handling
+ ;;
+ *)
+ MODULES_LOAD="$MODULES_LOAD $mod"
+ ;;
+ esac
+done
+
# Initialize the Xorcom Astribank (xpp/) using perl utiliites:
# intended to replace all the the three functions below if user has
# installed the zaptel-perl utilities.
@@ -102,7 +128,9 @@ rsync)
;;
unload)
$AST_SCRIPT stop
- unload_module zaptel
+ for mod in $REMOVE_MODULES; do
+ unload_module $mod
+ done
;;
load)
# TODO: Find a way to use modprobe.