You seem to be the keeper of the init scripts, so I'll pass this on to
you, with a cc to the RH 7.1 list in case anyone out there can use it
as well.

I'm getting old & senile and can no longer always remember the name of
every init script in /etc/rc.d/init, so I decided it would be nice to
list them by name. So I added that capability to the script "service".

Like so:

[root@charlesc /sbin]# diff service service.au 
4c4
< USAGE="Usage: `basename $0` < option > | --status-all | --list | \
---
> USAGE="Usage: `basename $0` < option > | --status-all | \
17c17
<     -h | --h* )
---
>     --help | -h | --h* )
40,57d39
<           exit 0
<        elif [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--list" ]; then
<           cd "${SERVICEDIR}"
<         let COUNT=0
<           for SERVICE in *; do
<             case "${SERVICE}" in
<               functions | halt | killall | single| linuxconf | kudzu | \
<                   *rpmorig | *rpmnew | *rpmsave | *~ | *.orig)
<                   ;;
<               *)
<                 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
<                   LIST[$COUNT]="${SERVICE}"
<                 let COUNT=COUNT+1
<                 fi
<                 ;;
<             esac
<           done
<         ls ${LIST[@]}


As you can see, I also simplified the test for the help command line
switch.

Enjoy.


-- 

                -- C^2

The world's most effective anti-virus software: Linux.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

Attachment: msg04574/pgp00000.pgp
Description: PGP signature

Reply via email to