diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-06 18:32:20 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-06 18:32:20 +0000 |
commit | 610e410b984a3dc9dbc5ab43bed16f5461f03130 (patch) | |
tree | f7b6e1132154bfcd18d176b3a6cecb988bc81b29 | |
parent | 338650f9339903c8eab373c16408b6d5a6f910ef (diff) |
slightly simplify the new dahdi.init
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7497 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | dahdi.init | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -78,16 +78,17 @@ unload_module() { # 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 - (echo $mod | grep dahdi_echocan) > /dev/null 2>&1 - if [ $? != 0 ]; then + 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) - else - ec_modules="$mod $ec_modules" - fi - # TODO: the following is probably the error handling we want: - # if [ $? != 0 ]; then return 1; fi + ;; + esac done # Now that all the other dependencies are unloaded, we can unload the # dahdi_echocan modules. The drivers that register spans may keep |