Bug 150710 - ifup has a logical mistake on ONBOOT and HOTPLUG parsing
Summary: ifup has a logical mistake on ONBOOT and HOTPLUG parsing
Status: CLOSED DUPLICATE of bug 136531
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts   
(Show other bugs)
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Keywords: Security
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:08:16 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

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:

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.