From 6815e5932f1a6aa0d7301f728351fd9b85f2a854 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 4 Oct 2009 13:35:51 +0000 Subject: 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 --- dahdi.init | 34 +++++++++++++++++++--------------- 1 file 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 -- cgit v1.2.3