From: Michael Gebetsroither Date: Tue, 13 Dec 2005 15:43:11 +0000 (+0100) Subject: added fix to service routines X-Git-Tag: 1.02.06~3 X-Git-Url: http://git.grml.org/?p=grml-shlib.git;a=commitdiff_plain;h=82236a90db1ea678898ab889fd505ac4edad9be5;hp=f8e00cff9c81fe071494af7d5a07c551f02add25 added fix to service routines --- diff --git a/sh-lib b/sh-lib index 27e8ff3..79f0ae6 100644 --- a/sh-lib +++ b/sh-lib @@ -14,6 +14,9 @@ VERBOSE_TMP__=0 # FIXME maybe PROG_PATH__ for better error reporting? PROG_NAME__="" # initialised within init section +# directory for init scripts +INITD_DIR__="/etc/init.d/" + # >= level and the function will print the message EPRINT__=1 # eprint (error print) EEPRINT__=2 # 2print (intern error print) @@ -581,6 +584,7 @@ function _touchService return 1 done + service_="${INITD_DIR__}/$service_" if [ ! -e "$service_" ]; then $error_function_ "service does not exist: \"$service_\"" return 1 @@ -589,7 +593,7 @@ function _touchService $error_function_ "service is not executable: \"$service_\"" fi - /etc/init.d/$service_ $action_ + "$service_" "$action_" } function _createServiceFunctions @@ -617,7 +621,6 @@ function ${i}Service done } _createServiceFunctions - # }}} # prints the next free /dev/loop* to stdout