summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-19 14:09:29 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-19 14:09:29 +0000
commit503296d3b2283afe9e11a3558733692068f2e358 (patch)
tree07ef5c1941ca77fda13a98050f5b8d21ee73220d /build_tools
parent0cd31e650cb72d4307910f4cd772c7b0cc8b9711 (diff)
live_dahdi: Only probe modules to load on 'load'
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5711 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/live_dahdi20
1 files changed, 12 insertions, 8 deletions
diff --git a/build_tools/live_dahdi b/build_tools/live_dahdi
index 1ebed97..40bebd2 100755
--- a/build_tools/live_dahdi
+++ b/build_tools/live_dahdi
@@ -49,11 +49,13 @@ dahdi_drivers() {
'
}
-# Detect the modules used in the system:
-# This may an annoying warning when live_dahdi is run before
-# installation. Ignore it for now.
-for mod in `dahdi_drivers`; do
- case "$mod" in
+# Add modules for existing hardware on the system for the list of
+# modules to load.
+#
+# As module loading is manual with insmod, some manual fixes are needed.
+set_modules_to_load() {
+ for mod in `dahdi_drivers`; 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"
@@ -64,15 +66,16 @@ for mod in `dahdi_drivers`; do
;;
wctdm24xxp | wct4xxp | wcte12xp | wctc4xp)
MODULES_LOAD="$MODULES_LOAD $mod/$mod"
- ;;
+ ;;
wanpipe)
: # requires different handling
;;
*)
MODULES_LOAD="$MODULES_LOAD $mod"
;;
- esac
-done
+ esac
+ done
+}
# Initialize the Xorcom Astribank (xpp/) using perl utiliites:
# intended to replace all the the three functions below if user has
@@ -171,6 +174,7 @@ unload)
load)
# TODO: Find a way to use modprobe.
# Or implement a way to pass arguments to modules here (yuck)
+ set_modules_to_load
for module in $MODULES_LOAD; do
eval module_args="\$`basename ${module}`_ARGS"
insmod $MODULES_DIR/$module.ko $module_args