On Mon, 18 Aug 2008 08:26:10 +0300 Damyan Ivanov <[EMAIL PROTECTED]> wrote: > Actually, in hotkey.sh we only need to see if the wireless is enabled, > i.e. whether there is a wireless interface available at all, not its > name.
Yes, but elsewhere don't we need its name? So I was thinking of a function returning the name. If it is non-null that would indicate the presence of a wireless interface. > so perhaps something along the lines of > > if [ -n "`iwconfig | grep -v '^$' | grep -v 'no wireless extensions'`" ] No. This is incorrect because 'no wireless extensions' is output on stderr, not stdout. > but I am not sure this is much more elegant either. iwconfig(1) talks > about /proc/net/wireless itself so we may as well stick to the source > of the information :) Yes, I thought of that, but it looked slightly more complicated to parse out the wireless name. Surely we are not the first to want to determine this. Isn't there an implementation of this anywhere else in Debian? I started to look but admit I didn't do a very careful or thorough search. Ben _______________________________________________ Debian-eeepc-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel
