summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-11-06 18:32:20 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-11-06 18:32:20 +0000
commit610e410b984a3dc9dbc5ab43bed16f5461f03130 (patch)
treef7b6e1132154bfcd18d176b3a6cecb988bc81b29
parent338650f9339903c8eab373c16408b6d5a6f910ef (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-xdahdi.init15
1 files changed, 8 insertions, 7 deletions
diff --git a/dahdi.init b/dahdi.init
index 7fb16cc..cbc9dc7 100755
--- a/dahdi.init
+++ b/dahdi.init
@@ -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