Bug 45364 - network-scripts broken in 5.90-1
network-scripts broken in 5.90-1
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts (Show other bugs)
1.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-21 10:52 EDT by Enrico Scholz
Modified: 2014-03-16 22:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-06-21 10:55:17 EDT
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 Enrico Scholz 2001-06-21 10:52:02 EDT
Some issues of the current initscripts-5.90-1:


/etc/sysconfig/network-scripts/network-functions, is_wireless_device():

|   return iwconfig $1 | grep -q -v "no wireless extensions"

should be

|   return `iwconfig $1 2>&1 | grep -q -v "no wireless extensions"`

(remark the missing backticks and the `2>&1')


/sbin/ifup contains the clause

|    if check_link_down ${DEVICE}; then
|        echo " failed; no link present.  Check cable?"
|        exit 1
|    fi

but check_link_down() succeeds if the the link is *up*. So either the
condition or the return-value of check_link_down should be inverted.
Comment 1 Enrico Scholz 2001-06-21 10:55:13 EDT
|   return `iwconfig $1 2>&1 | grep -q -v "no wireless extensions"`

is bad (but working). Better write:

|   iwconfig $1 2>&1 | grep -q -v "no wireless extensions"
|   return $?

where $? can be omitted.
Comment 2 Bill Nottingham 2001-06-21 14:36:33 EDT
Thanks, will be fixed in 5.91-1.
Comment 3 Enrico Scholz 2001-06-21 21:28:35 EDT
Sorry. my proposal is faulty:

iwconfig gives out an additional empty which is matched by the `grep -qv'.
Therefore grep succeeds there evrytime.

-------------------------
is_wireless_device ()
{
  if [ -x /sbin/iwconfig ]; then
    iwconfig $1 2>&1 | grep -q "no wireless extensions" || return 0
  fi

  return 1
}
-------------------------

should work (I hope ;) )
Comment 4 Bill Nottingham 2001-06-25 13:52:29 EDT
added in 5.93-1 - thanks!

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