[svn-commits] tzafrir: linux/trunk r9163 - /linux/trunk/build_tools/live_dahdi

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 18 11:56:45 CDT 2010


Author: tzafrir
Date: Wed Aug 18 11:56:41 2010
New Revision: 9163

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9163
Log:
live_dahdi: shutdown dynamic spans to to avoid panic

If we fail to shutdown the dynamic spans, we may get a panic on the next
load.

This attempts to guess when we need to unload spans at unload.

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=9163&r1=9162&r2=9163
==============================================================================
--- linux/trunk/build_tools/live_dahdi (original)
+++ linux/trunk/build_tools/live_dahdi Wed Aug 18 11:56:41 2010
@@ -174,6 +174,15 @@
 	fi
 	
 	dahdi_cfg -c "$conf_file"
+}
+
+unload_dynamic() {
+	if [ "$DYNAMIC_LOC" != yes ]; then return; fi
+
+	local conf_file="$DESTDIR/etc/dahdi/dynamic.conf"
+	if [ ! -r "$conf_file" ]; then return; fi
+
+	dahdi_cfg -c "$conf_file" -s || :
 }
 
 genconf() {
@@ -248,6 +257,7 @@
 unload)
 	# OK for Asterisk not to be running. TODO: a better test?
 	$AST_SCRIPT stop || :
+	unload_dynamic
 	for mod in $REMOVE_MODULES; do
 		unload_module $mod
 	done




More information about the svn-commits mailing list