X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sh-lib;h=79f0ae6eaece8c2faf510c3457b8a0f0f98c9e51;hb=82236a90db1ea678898ab889fd505ac4edad9be5;hp=27e8ff3374049870b96834c8b61ad4bf1a37cbc1;hpb=f8e00cff9c81fe071494af7d5a07c551f02add25;p=grml-shlib.git 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