From 503296d3b2283afe9e11a3558733692068f2e358 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 19 Jan 2009 14:09:29 +0000 Subject: 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 --- build_tools/live_dahdi | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'build_tools') 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 -- cgit v1.2.3