summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-04 13:35:51 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-04 13:35:51 +0000
commit6815e5932f1a6aa0d7301f728351fd9b85f2a854 (patch)
tree9deebf3b63f88e2802bad192d412489aa7e4e690
parentbc013521facb7547af65e9f76d2503c2c89f6046 (diff)
dahdi.init: move module loading to a separate function
Move the module loading parts of the dahdi init script to a seperate function - load_modules. To be used by a later commit. There is not functional change here (but the diff is confusing). git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7334 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-xdahdi.init34
1 files changed, 19 insertions, 15 deletions
diff --git a/dahdi.init b/dahdi.init
index 5c1a3f0..a0882a8 100755
--- a/dahdi.init
+++ b/dahdi.init
@@ -144,21 +144,7 @@ shutdown_dynamic() {
$DAHDI_CFG_CMD -s
}
-if [ ! -x "$DAHDI_CFG" ]; then
- echo "dahdi_cfg not executable"
- exit 0
-fi
-
-if [ ! -f /etc/dahdi/system.conf ]; then
- echo "/etc/dahdi/system.conf not found. Nothing to do."
- exit 0
-fi
-
-RETVAL=0
-
-# See how we were called.
-case "$1" in
- start)
+load_modules() {
# Some systems, e.g. Debian Lenny, add here -b, which will break
# loading of modules blacklisted in modprobe.d/*
unset MODPROBE_OPTIONS
@@ -181,6 +167,24 @@ case "$1" in
fi
done
echo ""
+}
+
+if [ ! -x "$DAHDI_CFG" ]; then
+ echo "dahdi_cfg not executable"
+ exit 0
+fi
+
+if [ ! -f /etc/dahdi/system.conf ]; then
+ echo "/etc/dahdi/system.conf not found. Nothing to do."
+ exit 0
+fi
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+ start)
+ load_modules
TMOUT=$DAHDI_DEV_TIMEOUT # max secs to wait