Bug 150710 - ifup has a logical mistake on ONBOOT and HOTPLUG parsing
ifup has a logical mistake on ONBOOT and HOTPLUG parsing
Status: CLOSED DUPLICATE of bug 136531
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-09 16:39 EST by Itai Fonio
Modified: 2014-03-16 22:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:08:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Itai Fonio 2005-03-09 16:39:40 EST
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 17:00:59 EST

*** This bug has been marked as a duplicate of 136531 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:08:16 EST
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.