Bug 45364

Summary: network-scripts broken in 5.90-1
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 1.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-21 14:55:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Enrico Scholz 2001-06-21 14:52:02 UTC
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 14:55:13 UTC
|   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 18:36:33 UTC
Thanks, will be fixed in 5.91-1.

Comment 3 Enrico Scholz 2001-06-22 01:28:35 UTC
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 17:52:29 UTC
added in 5.93-1 - thanks!