Bug 876971

Summary: usage message produced by restorecond init script is incomplete
Product: Red Hat Enterprise Linux 6 Reporter: Michal Trunecka <mtruneck>
Component: policycoreutilsAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Michal Trunecka <mtruneck>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: dwalsh, ebenes, ksrot, mgrepl
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: policycoreutils-2.0.83-19.30.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:15:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Trunecka 2012-11-15 12:24:00 UTC
Init script allows using "reload" operation, but usage listing of the script doesn't mention it.

Version-Release number of selected component (if applicable):
RHEL6.4-20121011.n.0
policycoreutils-newrole-2.0.83-19.26.el6.x86_64
policycoreutils-2.0.83-19.26.el6.x86_64
policycoreutils-gui-2.0.83-19.26.el6.x86_64
policycoreutils-sandbox-2.0.83-19.26.el6.x86_64
policycoreutils-python-2.0.83-19.26.el6.x86_64


Steps to Reproduce: 
 * List operation of restorecond:
tail -n 22 /etc/init.d/restorecond | grep '[  ]*[|a-zA-Z-]*)' | cut -d ')' -f 1 | tr '|' '\n' | tr -d '  ' | grep -v '*' | sort
 * List operation listed in usage:
grep -i usage /etc/init.d/restorecond | cut -d '{' -f 2 | tr -d '}"' | tr '|' '\n' | sort

Actual results: 
"reload" keyword is missing in usage

Expected results:
usage message is complete

Comment 1 Miroslav Grepl 2012-11-16 09:15:51 UTC
"reload|force-reload" operations just do "restart". I am fixing usage.

Comment 2 RHEL Program Management 2012-11-16 09:31:10 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 7 Michal Trunecka 2013-01-14 11:20:57 UTC
But the options are still in the init script. Is it ok to have this undocumented feature there?

[root@dhcp-24-198 ~]# tail -n 22 /etc/init.d/restorecond | grep '[  ]*[|a-zA-Z-]*)' | cut -d ')' -f 1 | tr '|' '\n' | tr -d '  ' | grep -v '*' | sort
condrestart
force-reload
reload
restart
start
status
stop
[root@dhcp-24-198 ~]# grep -i usage /etc/init.d/restorecond | cut -d '{' -f 2 | tr -d '}"' | tr '|' '\n' | sort
condrestart
restart
start
status
stop

Comment 9 Karel Srot 2013-01-16 09:48:37 UTC
According to Fedora wiki:

The start, stop, restart, force-reload, and status actions shall be supported by all init scripts; the reload and the try-restart actions are optional. Other init-script actions may be defined by the init script. 

https://fedoraproject.org/wiki/FCNewInit/Initscripts#Init_Script_Actions


Therefore I don't think that removing the functionality from init script is correct.

Comment 10 Miroslav Grepl 2013-01-16 09:51:23 UTC
Karel,
I am going to fix it because we need a new build related to another bug.

Comment 13 errata-xmlrpc 2013-02-21 10:15:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0396.html