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 <e...@80386.nl> WWW: http://80386.nl/
pgpMVWa83mXMC.pgp
Description: PGP signature