Red Hat Bugzilla – Bug 242457
Wrong init script
Last modified: 2014-02-10 18:02:30 EST
Description of problem:
ip6tables and iptables init scripts contain several bugs. Both of them wrongly
return error codes and also call of status code is not correct. For example
if lsmod 2>/dev/null | grep -q ipchains ; then
echo -n $"ipchains and $IPTABLES can not be used together."; warning; echo
should not return exit code 0. Also status shoud be run always (irrespectible
whether the service could be successfully started).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
When fixing this bug, please obbey our init script guidelines and be sure that
status command is run correctly.
Our guidelines are on following two pages:
For an example of the script that returns the error codes correctly and always
runs status see:
This bug is tracked by 237789.
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release. Since this
bugzilla is in a component that is not approved for the current
release, it has been closed with resolution deferred. You may
reopen this bugzilla for consideration in the next release.
(In reply to comment #0)
> For example
> if lsmod 2>/dev/null | grep -q ipchains ; then
> echo -n $"ipchains and $IPTABLES can not be used together."; warning; echo
> exit 0
just a question ... we do not ship ipchains(*), shouldn't be that code dropped completely?
(*) well, is that usable with any kernel we ship? - RHEL-2.1 U6 has 2.4.9 with iptables ...
otherwise, is there any sane way how to test that condition?
Created attachment 342291 [details]
Proposed init script patch for LSB conformance
can you please have a look at the patch from comment #13. Are the return codes ok for you?
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.