Bug 108470 - Enhancement: "services --list" to show services
Summary: Enhancement: "services --list" to show services
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-29 21:18 UTC by Charles Curley
Modified: 2014-03-17 02:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-30 05:09:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Charles Curley 2003-10-29 21:18:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716

Description of problem:
I don't always remember the name of the executable of a service, e.g. is it
"bind" or "named"? So it would be nice to have a simple way to list them, e.g.
"services --list". I wrote the code to do this; here is a patch against the
initscripts-7.36-2 version:

[root@issola root]# ls /sbin/service*
/sbin/service  /sbin/service~
[root@issola root]# diff /sbin/service*
8c8
< USAGE="Usage: `basename $0` < option > | --status-all | --list | \
---
> USAGE="Usage: `basename $0` < option > | --status-all | \
46,63d45
<        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[@]}
<         exit 0


Expected output, e.g.:

[root@issola root]# service --list
acpid      crond       keytable       nfslock     rhnsd      snmptrapd
anacron    gpm         microcode_ctl  nscd        saslauthd  sshd
atd        iptables    netfs          portmap     sendmail   syslog
autofs     irqbalance  network        random      smartd     xfs
cpqarrayd  kdcrotate   nfs            rawdevices  snmpd      yum


Of course, the patch is GPLled.

Version-Release number of selected component (if applicable):
initscripts-7.36-2

How reproducible:
Always

Steps to Reproduce:
1.N/A
2.
3.
    

Actual Results:  N/A

Expected Results:  N/A

Additional info:

N/A

Comment 1 Bill Nottingham 2003-10-30 05:09:54 UTC
chkconfig --list should do this ok.


Note You need to log in before you can comment on or make changes to this bug.