[arch-projects] [INITSCRIPTS][PATCH 2/6] Improve rc printing
Sebastien Luttringer
seblu at seblu.net
Wed May 4 21:04:46 EDT 2011
- 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 at 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
More information about the arch-projects
mailing list