Bug 70511 - iptables initscript status printing a mess
Summary: iptables initscript status printing a mess
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: iptables
Version: limbo
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: wdovlrrw
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 67218
TreeView+ depends on / blocked
 
Reported: 2002-08-01 22:14 UTC by Michael Schwendt
Modified: 2007-04-18 16:45 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-02 05:55:29 UTC
Embargoed:


Attachments (Terms of Use)
diff against /etc/init.d/iptables (2.12 KB, patch)
2002-08-01 22:14 UTC, Michael Schwendt
no flags Details | Diff

Description Michael Schwendt 2002-08-01 22:14:01 UTC
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  ]

Comment 1 Michael Schwendt 2002-08-01 22:14:32 UTC
Created attachment 68364 [details]
diff against /etc/init.d/iptables

Comment 2 Karsten Hopp 2002-08-07 14:32:56 UTC
Thanks for the patch! I've added a very similar one to 1.2.6a-2 and  
improved the checking of the returncodes


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