[svn-commits] tzafrir: linux/trunk r8818 - /linux/trunk/build_tools/live_dahdi
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jun 29 04:41:25 CDT 2010
Author: tzafrir
Date: Tue Jun 29 04:41:22 2010
New Revision: 8818
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8818
Log:
live_dahdi: properly unload EC modules
Copy sruffel's fix to the init.d script from -tools.
Modified:
linux/trunk/build_tools/live_dahdi
Modified: linux/trunk/build_tools/live_dahdi
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/build_tools/live_dahdi?view=diff&rev=8818&r1=8817&r2=8818
==============================================================================
--- linux/trunk/build_tools/live_dahdi (original)
+++ linux/trunk/build_tools/live_dahdi Tue Jun 29 04:41:22 2010
@@ -132,14 +132,27 @@
set -- $line
# $1: the original module, $2: size, $3: refcount, $4: deps list
mods=`echo $4 | tr , ' '`
+ ec_modules=""
# xpp_usb keeps the xpds below busy if an xpp hardware is
# connected. Hence must be removed before them:
case "$module" in xpd_*) mods="xpp_usb $mods";; esac
+
for mod in $mods; do
- # run in a subshell, so it won't step over our vars:
- (unload_module $mod)
- # TODO: the following is probably the error handling we want:
- # if [ $? != 0 ]; then return 1; fi
+ case "$mod" in
+ dahdi_echocan_*)
+ ec_modules="$mod $ec_modules"
+ ;;
+ *)
+ # run in a subshell, so it won't step over our vars:
+ (unload_module $mod)
+ ;;
+ esac
+ done
+ # Now that all the other dependencies are unloaded, we can unload the
+ # dahdi_echocan modules. The drivers that register spans may keep
+ # references on the echocan modules before they are unloaded.
+ for mod in $ec_modules; do
+ (unload_module $mod)
done
rmmod $module
}
More information about the svn-commits
mailing list