Red Hat Bugzilla – Bug 60711
'netfs status' should set exit value
Last modified: 2014-03-16 22:25:55 EDT
Description of Problem:
'service netfs status' will return successfully regardless of whether the
service has been started or not. I think it ought to exit with a non-zero value
when the service has been stopped or just isn't enabled. This is would be very
useful for scripts that need to stop and restart services on specific events,
such as /etc/sysconfig/apm-scripts/apmscript.
Version-Release number of selected component (if applicable):
initscripts-6.40 or initscripts-6.53-1
Steps to Reproduce:
1. service netfs stop
2. service netfs status
3. echo $?
Created attachment 47404 [details]
Set exit value based on /var/lock/subsys on 'netfs status'
The attached patch is against current Raw Hide version.
Aslo applies to Red Hat 7.3; version number updated.
Added, will be in 8.17-1.