ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2
authorFelix Fietkau <nbd@openwrt.org>
Sun, 3 Jan 2016 14:48:06 +0000 (14:48 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 3 Jan 2016 14:48:06 +0000 (14:48 +0000)
commit5dea0e0c917eb4d3fcfe5cd79e98e068e3612218
tree804e1ff2e3f26d43f76df53984465671340f077b
parent93422ec706152a838feb72eab6e72971436688fa
ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2

There are a few NETGEAR devices which don't terminate the model name in the
ART with a NUL byte, at least some NETGEAR WNDR3700v2. The current awk
expression doesn't match 0xFF bytes, so AR71XX_MODEL contains lots of
trailing 0xFF garbage in this case.

Fix this by matching for the first non-printable character and explicitly
setting LC_CTYPE=C (probably not strictly necessary on OpenWrt, but will
definitely work like this, even when awk supports locales and LANG is set).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of r46455

SVN-Revision: 48087
target/linux/ar71xx/base-files/lib/ar71xx.sh