base-files: strip quotes from the MAC address in macaddr_canonicalize()

Extracted from http://patchwork.openwrt.org/patch/5716/

Signed-off-by: Forest Crossman <cyrozap@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 41639
This commit is contained in:
Gabor Juhos 2014-07-14 10:25:49 +00:00
parent c8bde9da4a
commit 69abf630cf

View File

@ -82,6 +82,7 @@ macaddr_canonicalize()
local mac="$1"
local canon=""
mac=$(echo -n $mac | tr -d \")
[ ${#mac} -gt 17 ] && return
[ -n "${mac//[a-fA-F0-9\.: -]/}" ] && return