On Mon, 2005-11-14 at 18:10 -0500, Steve Pomeroy wrote: > Package: whereami > Version: 0.3.28 > Severity: normal > > The tests/testap script has two inverted string tests for the madwifi > detection. This causes whereami to not bring up the wireless interface > properly. Attached is a patch to correct the two lines.
Are you sure that's true? Is it perhaps the case that the madwifi driver has improved and no longer needs this wierdness... AFAICS, for madwifi: 1) ISMADWIFI="`grep ath_pci /proc/modules 2>/dev/null`" OK, so for a madwifi this should definitely be set to a non-zero-length string... 2) if [ ! -z "$ISMADWIFI" ] ; then # For reliable scanning, the interface needs to be down, and # then brought up for (at least) 4 seconds. # - true as at madwif + kernel 2.6.10, 29 December 2004 ifconfig ${INTERFACE} down fi I.e.: if ISMADWIFI is not zero-length then ifconfig down This is supposed to happen when it is a madwifi. Except there used to be a 4 second delay in there after it was done (code rot? :-) Possibly this is no longer required with the madwifi card... 3) if [ ! -z "$ISMADWIFI" ] ; then # Put the interface back how we found it... # except we won't do this on the MADWIFI, because the driver # doesn't seem to support a non-destructive scan anyway :-( if [ "$IFSTATE" = "" ] ; then ifconfig ${INTERFACE} down fi fi Now this does look like a bug. Given that the interface was always artificially downed for madwifi and this code will presumably only execute for a madwifi it is always true. I wonder if the code can just be stripped back without the special casing for madwifi now? Can you try the attached script and see if that works? Thanks, Andrew. ------------------------------------------------------------------------- Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267 Open Source: the difference between trust and antitrust -------------------------------------------------------------------------
testap
Description: application/shellscript
signature.asc
Description: This is a digitally signed message part