[OpenWrt-Devel] [PATCH v4] brcm-wl: fix bash comparison error
Bastian Bittorf
bittorf at bluebottle.com
Sat Oct 18 16:37:59 EDT 2014
* Nathan Hintz <nlhintz at hotmail.com> [18.10.2014 22:24]:
> Using the "\n" is not correct. I think the real problem is that the logic is reversed (should be && instead of ||); although it might
> be better to eliminate the conditional entirely since leddc is always commanded to "0xffff" when the interface is taken down.
>
> local leddc=$(wlc ifname "$device" leddc)
> [ "$leddc" = "0xffff" ] && {
> leddc=0x005a000a
> }
what about:
case "$leddc" in
'0xffff'*)
leddc='0x005a000a'
;;
esac
IMHO the approach from felix does not work:
root at box:~ echo $((0xffff))
65535
root at box:~ echo $((0xffff\n))
-ash: arithmetic syntax error
the real would be the fix the output of 'wlc'.
bye bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list