aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-05-04 23:40:33 +0200
committerTom Gundersen <teg@jklm.no>2011-05-12 02:45:18 +0200
commitbdf728fbfaf439c3b8d0fae5013330277648ec9b (patch)
tree74c478a85e43e5d758c7f207e4e426332602d940
parent1640b0515f56dfa18c0237a686ade7f3b6893c81 (diff)
downloadinitscripts-2011.05.2.tar.xz
Improve rc printing2011.05.2
- print daemon text with C_CLEAR and not C_MAIN - print rc name based on $0 (in case of renaming) Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
-rwxr-xr-xrc.d13
1 files changed, 7 insertions, 6 deletions
diff --git a/rc.d b/rc.d
index 743d86b..02c2b6c 100755
--- a/rc.d
+++ b/rc.d
@@ -4,12 +4,13 @@
. /etc/rc.d/functions
usage() {
- cat >&2 << EOF
-usage: rc action daemon ...
+ local name=${0##*/}
+ cat >&2 << EOF
+usage: $name action daemon ...
-e.g: rc list
- rc help
- rc start sshd gpm
+e.g: $name list
+ $name help
+ $name start sshd gpm
EOF
exit 1
}
@@ -37,7 +38,7 @@ case $1 in
else
printf "${C_OTHER}[${C_FAIL} ${C_OTHER}]"
fi
- printf " ${C_MAIN}$d${C_CLEAR}\n"
+ printf " ${C_CLEAR}$d\n"
done
;;
*)