diff options
author | Eric Bélanger <snowmaniscool@gmail.com> | 2011-05-26 22:07:23 -0400 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-06-01 01:54:01 +0200 |
commit | aac43067a13f1940f8f81f45142463e85ce21de2 (patch) | |
tree | dcfa202e8591813d714b4c57532e83258e679534 /rc.d | |
parent | dfdf8b683633d89a9c7c7560397c57a8a1594147 (diff) |
rc.d: Add error message when daemon script is not found
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |