diff options
Diffstat (limited to 'dahdi.init')
-rwxr-xr-x | dahdi.init | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -37,6 +37,10 @@ XPP_SYNC=auto # device nodes after the modules have loaded and before running dahdi_cfg. DAHDI_DEV_TIMEOUT=20 +# A list of modules to unload when stopping. +# All of their dependencies will be unloaded as well. +DAHDI_UNLOAD_MODULES="dahdi" + # # Determine which kind of configuration we're using # @@ -99,6 +103,12 @@ unload_module() { rmmod $module } +unload_modules() { + for module in $DAHDI_UNLOAD_MODULES; do + unload_module $module + done +} + # In (xpp) hotplug mode, the init script is also executed from the # hotplug hook. In that case it should not attempt to loade modules. # @@ -275,7 +285,7 @@ case "$1" in # Unload drivers #shutdown_dynamic # FIXME: needs test from someone with dynamic spans echo -n "Unloading DAHDI hardware modules: " - if unload_module dahdi; then + if unload_modules; then echo "done" else echo "error" @@ -285,7 +295,7 @@ case "$1" in fi ;; unload) - unload_module dahdi + unload_modules ;; restart|force-reload) $0 stop |