Hide Forgot
Created attachment 794236 [details] patch implementing the requested behaviour Description of problem: The /sbin/service script only works for services managed via System V style init scripts in /etc/init.d. It would be very useful if the same interface also worked transparently for upstart jobs in /etc/init (and possibly other init systems in the future). This applies to custom services, but also to some base services in RHEL. Version-Release number of selected component (if applicable): initscripts-9.03.38-1 How reproducible: always Steps to Reproduce: 1. sudo service prefdm status Actual results: prefdm: unrecognized service Expected results: prefdm stop/waiting or prefdm start/running, process ... Additional info: A similar change has been made to the script in Debian and Ubuntu: https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/427277 and specifically https://launchpadlibrarian.net/31973400/out Version in Debian (http://packages.debian.org/jessie/sysvinit-utils) also supports systemd. The attached patch (based on version in Debian) implements the requested behaviour.
I really don't like this idea, we don't encourage customers to write their own upstart jobs, there are only few of them in rhel6 and upstarts jobs will not be supported in rhel7. Also there are issues when job and initscript have the same name. We have already modified service to work with systemd, but that is a different case, because systemd is handling services with initscripts directly.