From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020724 Description of problem: [Fighting with words on how to explain this. ;-) The attached patch should make clear what this is about.] Due to incorrect usage of the success() and failure() functions and missing "echo" prints, both "service iptables start" and "service iptables stop" give success/failure status messages in wrong order and with incomplete status description strings. For instance, an [ OK ] at the end of one line actually is for the following line. Another [ OK ] is on an empty line. Further, some OK/FAILED messages are without a description and overwrite eachother. Version-Release number of selected component (if applicable): iptables-1.2.5-5 How reproducible: Always Steps to Reproduce: 1. Load some iptables rules. 2. service iptables save 3. Play with service iptables start and stop. 4. Watch output or read the /etc/init.d/iptables script. Actual Results: # service iptables start Flushing all current rules and user defined chains: [ OK ] Clearing all current rules and user defined chains: [ OK ] Applying iptables firewall rules: [ OK ] [ OK ] # service iptables stop Resetting built-in chains to the default ACCEPT policy: [ OK ] Expected Results: (this is after applying my patch) # service iptables start Flushing all current rules and user defined chains: [ OK ] Clearing all current rules and user defined chains: [ OK ] Applying iptables firewall rules: [ OK ] # service iptables stop Flushing all chains: [ OK ] Removing user defined chains: [ OK ] Resetting built-in chains to the default ACCEPT policy: [ OK ]
Created attachment 68364 [details] diff against /etc/init.d/iptables
Thanks for the patch! I've added a very similar one to 1.2.6a-2 and improved the checking of the returncodes