Bug 876971 - usage message produced by restorecond init script is incomplete
Summary: usage message produced by restorecond init script is incomplete
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: policycoreutils
Version: 6.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-15 12:24 UTC by Michal Trunecka
Modified: 2014-09-30 23:33 UTC (History)
4 users (show)

Fixed In Version: policycoreutils-2.0.83-19.30.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 10:15:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0396 0 normal SHIPPED_LIVE policycoreutils bug fix and enhancement update 2013-02-20 20:51:18 UTC

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


Note You need to log in before you can comment on or make changes to this bug.