Bug 108470 - Enhancement: "services --list" to show services
Enhancement: "services --list" to show services
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-29 16:18 EST by Charles Curley
Modified: 2014-03-16 22:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-30 00:09:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Charles Curley 2003-10-29 16:18:37 EST
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 00:09:54 EST
chkconfig --list should do this ok.

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