Bug 49021
Summary: | WIRELESS test in net.agent calls everything wireless... | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Michael K. Johnson <johnsonm> |
Component: | hotplug | Assignee: | Trond Eivind Glomsrxd <teg> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-04-12 17:04:28 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
Michael K. Johnson
2001-07-13 01:33:46 UTC
Well, I did say at least two bugs.
The | actually causes the WIRELESS=1 to be evaluated in a subshell.
Because iwconfig is broken and doesn't know how to just look to see
if there are any wireless extensions, we have to use eval. Yes, this
is ugly, but it is also now tested more...
eval $(iwconfig $INTERFACE 2>&1 | grep -q "no wireless extensions"
>/dev/null 2>&1 || echo WIRELESS=1)
That I've tested enough times to have reasonable confidence that it
is right.
It could also load the network-functions file and use the is_wireless test there. Of course, that would tie it to having at least a particular version of initscripts. I'll do what notting suggests. Make that four bugs in the script. You forgot: - uses completely bogus variable ${REALDEVICE} - doesn't normalize output of 'ip' commmand case wise Wheeeeeeeee. Also fixed the original, just using a simple if !iwconfig ... ; then <do stuff>; seems simpler to read, at least. Fixed in 2001-04-24-7. I just installed 7.2, and this is NOT all fixed. grep NEEDS A FILE DESCRIPTOR and it kills the script if you don't have one. EVERY SINGLE ethernet card you insert has the wireless bits run because grep complains with grep: writing output: Bad file descriptor All you have to do to test this is add exec 2>> /tmp/netagent.log set -x to the top of /etc/hotplug/net.agent and then insert a card with no wireless extensions. (just installed 7.2 on the machine I noticed this on originally, that is; the only machine where I have a setup that shows up this bug.) To make this clear, you ABSOLUTELY MUST give grep file descriptors to write on, or it aborts. The hotplug daemon does not do so. Either add exec >/dev/null exec 2>/dev/null in hotplug.functions, or go through and fix every instance in the hotplug scripts AND all the networking scripts that get called through hotplug to explicitly redirect output, or modify the hotplug daemon to open /dev/null for stdout and stderr. Using the "-q" argument to grep is not enough here. I know it looks prettier than ">/dev/null 2>&1" but the two are not synonyms. Is this still a problem in skipjack2 or later? Some grep issues have been adresses, and a new hotplug is in... As I wrote before:
>EVERY SINGLE ethernet card you
>insert has the wireless bits run because grep complains with
>grep: writing output: Bad file descriptor
>All you have to do to test this is add
>exec 2>> /tmp/netagent.log
>set -x
>to the top of /etc/hotplug/net.agent and then insert a card with no
>wireless extensions.
Have you done that? I'm out of range of a skipjack machine right now.
Hotplug no longer handles wireless cards at all, in the latest limbo beta. |