summaryrefslogtreecommitdiff
path: root/rc.d
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-19 13:29:16 -0400
committerDave Reisner <dreisner@archlinux.org>2011-08-19 13:29:16 -0400
commita1e44e2633596e7f12364ec3e33b4012332046bb (patch)
treec3939560dff4eb92859bd3e695d7848a9d8c2553 /rc.d
parent3ee7b326ad6d60b0d713cfd5c958c18e111b9e28 (diff)
rc.d: clarify error when [[ -x /etc/rc.d/$i ]] fails
A script marked a-x will be reported as missing, when in fact it's only non-executable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.d b/rc.d
index a7b214e..5cb03f8 100755
--- a/rc.d
+++ b/rc.d
@@ -69,7 +69,8 @@ case $1 in
if [[ -x "/etc/rc.d/$i" ]]; then
env -i "${ENV[@]}" "/etc/rc.d/$i" "$action"
else
- printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does not exist.${C_CLEAR}\n"
+ printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script \`%s' does not exist or is not executable.${C_CLEAR}\n" \
+ "$i"
fi
(( ret += !! $? )) # clamp exit value to 0/1
done