summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-08-18 16:56:41 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-08-18 16:56:41 +0000
commitdaf0908d549d226f2aad76bf8882858dd5a99f87 (patch)
tree9612347cb92107aa98c459da4c5c1b1c928535e6
parent4c1e3e045fa0cb6908221cec3d46038a69397ea4 (diff)
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. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9163 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-xbuild_tools/live_dahdi10
1 files changed, 10 insertions, 0 deletions
diff --git a/build_tools/live_dahdi b/build_tools/live_dahdi
index e7e29ef..d23e46d 100755
--- a/build_tools/live_dahdi
+++ b/build_tools/live_dahdi
@@ -176,6 +176,15 @@ EOF
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() {
GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
DAHDI_CONF_FILE=$DESTDIR/etc/dahdi/system.conf \
@@ -248,6 +257,7 @@ rsync)
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