- 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> --- rc | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rc b/rc index 743d86b..02c2b6c 100755 --- a/rc +++ b/rc @@ -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 ;; *) -- Sebastien "Seblu" Luttringer