Bug 150710 - ifup has a logical mistake on ONBOOT and HOTPLUG parsing
Summary: ifup has a logical mistake on ONBOOT and HOTPLUG parsing
Keywords:
Status: CLOSED DUPLICATE of bug 136531
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-09 21:39 UTC by Itai Fonio
Modified: 2014-03-17 02:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:08:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Itai Fonio 2005-03-09 21:39:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020
Firefox/0.10.1

Description of problem:
"and" is stronger than "or".
that's why the lines:
if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]
if [ -n "$IN_HOTPLUG" -a "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ]

should be replaced with:
if [ "foo$2" = "fooboot" -a \("${ONBOOT}" = "no" -o "${ONBOOT}" = "NO"\) ]
if [ -n "$IN_HOTPLUG" -a \("${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO"\) ]

the condition should be:  $2 = boot AND ONBOOT equals either to "no"
or "NO"

right now the condition is: $2 = boot and ONBOOT equals to "no", OR
ONBOOT equals to "NO".

the same idea goes for the HOTPLUG expression




Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. set ONBOOT=no in the /etc/sysconfig/network-scripts/ifcfg-eth0
2. boot the system
3. ifup will configure an IP on eth0
    

Actual Results:  ifup configures an IP on eth0

Expected Results:  eth0 should not be configured

Additional info:

Comment 1 Bill Nottingham 2005-03-09 22:00:59 UTC

*** This bug has been marked as a duplicate of 136531 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:08:16 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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