Bug 5646 - /sbin/service fails
Summary: /sbin/service fails
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 6.1
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-06 17:36 UTC by tango
Modified: 2014-03-17 02:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-10-06 23:39:14 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description tango 1999-10-06 17:36:10 UTC
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 23:39:59 UTC
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.