[dahdi-commits] tzafrir: linux/trunk r5711 - /linux/trunk/build_tools/live_dahdi

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Jan 19 08:09:29 CST 2009


Author: tzafrir
Date: Mon Jan 19 08:09:29 2009
New Revision: 5711

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5711
Log:
live_dahdi: Only probe modules to load on 'load'

Modified:
    linux/trunk/build_tools/live_dahdi

Modified: linux/trunk/build_tools/live_dahdi
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/build_tools/live_dahdi?view=diff&rev=5711&r1=5710&r2=5711
==============================================================================
--- linux/trunk/build_tools/live_dahdi (original)
+++ linux/trunk/build_tools/live_dahdi Mon Jan 19 08:09:29 2009
@@ -49,11 +49,13 @@
 		'
 }
 
-# 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 @@
 			;;
 		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 @@
 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




More information about the dahdi-commits mailing list