Bug 5646 - /sbin/service fails
/sbin/service fails
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.1
i386 Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-06 13:36 EDT by tango
Modified: 2014-03-16 22:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-10-06 19:39:14 EDT
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 tango 1999-10-06 13:36:10 EDT
The "service" script passes wrong parameters to the init
script which calls. This script should allow things like:
service sendmail status
This should execute:
/etc/rc.d/init.d/sendmail status
but in fact it runs:
/etc/rc.d/init.d/sendmail sendmail status
A quick fix would be:

------------Script starts here-----------
#!/bin/sh
if [ -z "$1" ]; then
        echo "no service specified" >&2
        exit 1
elif [ -x "/etc/rc.d/init.d/$1" ]; then
        X="$1"
        shift
        "/etc/rc.d/init.d/$X" $*
else
        echo "$1: unrecognized service" >&2
        exit 1
fi
---------Script ends here---------------

Note: this script was also broken -but differently- in RH
6.0
Comment 1 Bill Nottingham 1999-10-06 19:39:59 EDT
Well, you see, what happened was... ;)
Fixed in initscripts-4.51-1, which will be in the next Raw Hide
release.

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