Description of problem: Cumin init script returns exit code '0' for unknown parameter. # service cumin dance Usage: /etc/init.d/cumin {start|stop|status|restart|condrestart} ecode=0 Other daemons returns '2'. # service sshd dance Usage: /etc/init.d/sshd {start|stop|restart|reload|force-reload|condrestart|try-restart|status} ecode=2 # service ntpd dance Usage: /etc/init.d/ntpd {start|stop|status|restart|try-restart|force-reload} ecode=2 Version-Release number of selected component (if applicable): cumin-0.1.5233-1.el6.noarch How reproducible: 100% Steps to Reproduce: 1. service cumin dance 2. echo $? Actual results: Cumin init script returns exit code '0' for unknown parameter Expected results: Cumin init script returns non-zero exit code for unknown parameter Additional info:
Fixed in revision 5378.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause The sysvinit script for Cumin returned a status code of 0 for unknown commands. Consequence Rather than indicate an error, the status code returned indicated success. Fix The status code is now set to 2 on an unknown command. Result The sysvinit script returns a non-zero error code when it is passed an unknown command. The value '2' is commonly used to indicate this condition.
Testing notes Cumin will use '2' as the status code for unknown commands # service cumin dance Usage: /etc/init.d/cumin {start|stop|status|restart|condrestart} # echo $? 2
I was able to reproduce on cumin-0.1.5444-1 Verified on RHEL5 and RHEL6, both i386 and x86_64, with cumin-0.1.5648-1