From aac43067a13f1940f8f81f45142463e85ce21de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20B=C3=A9langer?= Date: Thu, 26 May 2011 22:07:23 -0400 Subject: rc.d: Add error message when daemon script is not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric BĂ©langer Signed-off-by: Tom Gundersen --- rc.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d b/rc.d index 55871b1..97f266a 100755 --- a/rc.d +++ b/rc.d @@ -52,7 +52,12 @@ case $1 in ENV+=" CONSOLE='${CONSOLE:-/dev/console}'" ENV+=" TERM='${TERM}'" for i; do - [[ -x "/etc/rc.d/$i" ]] && cd / && eval /usr/bin/env -i $ENV "/etc/rc.d/$i" "$action" + if [[ -x "/etc/rc.d/$i" ]]; then + cd / + eval /usr/bin/env -i $ENV "/etc/rc.d/$i" "$action" + else + printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does not exist.\n" + fi (( ret += !! $? )) # clamp exit value to 0/1 done esac -- cgit v1.2.3