On 03/10/2014 19:37, Jo-Philipp Wich wrote: > Hi Michel, John. > >>> - for dev in $(ls /sys/class/ieee80211); do >>> + for dev in $(ls /sys/class/ieee80211 2>/dev/null); do >> what error do you see ? if you see an error we should try to fix that >> rather than supressing it > I suppose the case when "wifi detect" is invoked but no phy exists on > the system (e.g. because the radio hardware is not installed - think USB). > > In this case the entire /sys/class/ieee80211 is likely missing which > will cause "ls" to print a "No such file or directory" error. > > Actually I do not really like that whole "for x in $(ls ...)" construct, > something like the following would save one fork and also not produce > errors: > > for dev in /sys/class/ieee80211/*; do > if [ -h "$dev" ]; then > # do something with ${dev##*/} > fi > done the change from AutoLoad to AutoProbe will cause cfg80211 to not be loaded if no driver is loaded. hence ieee80211 is missing.
the for loop make sense ... > > ~ Jow > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel