Bug 709622 - Non-portable "while" loop form used
Summary: Non-portable "while" loop form used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Cong Wang
QA Contact: WANG Chao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-01 08:42 UTC by Denys Vlasenko
Modified: 2015-02-08 21:42 UTC (History)
5 users (show)

Fixed In Version: kexec-tools-1_102pre-134_el5
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-02-21 03:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0152 0 normal SHIPPED_LIVE Moderate: kexec-tools security, bug fix, and enhancement update 2012-02-21 07:24:50 UTC

Description Denys Vlasenko 2011-06-01 08:42:52 UTC
mkdumprd script contains this fragment:

            echo "deleting routers"
            while route del default gw 0.0.0.0 dev \$interface 2>/dev/null ; do
            done

This won't work in bash, bash requires at least one command in while loop body.
The fix might be:

            echo "deleting routers"
            while route del default gw 0.0.0.0 dev \$interface 2>/dev/null ; do
                :
            done

This is not an urgent problem since busybox shell does accept current form, but for compatibility with other shells it's better to change the script to be bash-compatible.

Comment 1 Cong Wang 2011-06-08 06:56:07 UTC
I did the same change for RHEL6, will change this for RHEL5 too.

Comment 5 Cong Wang 2012-01-21 07:07:03 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 6 errata-xmlrpc 2012-02-21 03:18:00 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/RHSA-2012-0152.html


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