svn commit: r200743 - in head/usr.sbin: . service

Ed Schouten ed at 80386.nl
Sun Dec 27 19:11:06 UTC 2009


Doug,

Even though I think having a help-feature is nice, just expecting users
to open up the proper manual page seems to be our tradition. Because of
that, I think we should change the usage-output to conform a bit more
with other applications. We should also display "-l | -r" instead of
"-l|r".

What do you think about the following patch?

%%%
Index: service.8
===================================================================
--- service.8	(revision 201047)
+++ service.8	(working copy)
@@ -35,7 +35,7 @@
 .Fl e
 .Nm
 .Op Fl v
-.Fl l|r
+.Fl l | r
 .Nm
 .Op Fl v
 .Ar <rc.d script> start|stop|etc.
Index: service.sh
===================================================================
--- service.sh	(revision 201047)
+++ service.sh	(working copy)
@@ -30,24 +30,14 @@
 load_rc_config 'XXX'
 
 usage () {
-	echo ''
-	echo 'Usage:'
-	echo "${0##*/} -e"
-	echo "${0##*/} [-v] -l|r"
-	echo "${0##*/} [-v] <rc.d script> start|stop|etc."
-	echo "${0##*/} -h"
-	echo ''
-	echo '-e	Show services that are enabled'
-	echo "-l	List all scripts in /etc/rc.d and $local_startup"
-	echo '-r	Show the results of boot time rcorder'
-	echo '-v	Verbose'
-	echo ''
+	echo "usage: ${0##*/} -e"
+	echo "       ${0##*/} [-v] -l | -r"
+	echo "       ${0##*/} [-v] <rc.d script> start|stop|etc."
 }
 
 while getopts 'ehlrv' COMMAND_LINE_ARGUMENT ; do
 	case "${COMMAND_LINE_ARGUMENT}" in
 	e)	ENABLED=eopt ;;
-	h)	usage ; exit 0 ;;
 	l)	LIST=lopt ;;
 	r)	RCORDER=ropt ;;
 	v)	VERBOSE=vopt ;;
%%%

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20091227/b9e8760b/attachment.pgp


More information about the svn-src-head mailing list