summaryrefslogtreecommitdiff
path: root/build_tools
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
commita8f174d31afd97edecadae2249e11ba376ce9b4e (patch)
tree9612347cb92107aa98c459da4c5c1b1c928535e6 /build_tools
parentc4f99bef4acfc5e5201b5758f5372ad134a85dca (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
Diffstat (limited to 'build_tools')
-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