From: Gabor Juhos Date: Mon, 14 Jul 2014 10:25:49 +0000 (+0000) Subject: base-files: strip quotes from the MAC address in macaddr_canonicalize() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=69abf630cf32e022cc56f405f2e335c4e913965f;p=openwrt%2Fstaging%2Frmilecki.git base-files: strip quotes from the MAC address in macaddr_canonicalize() Extracted from http://patchwork.openwrt.org/patch/5716/ Signed-off-by: Forest Crossman Signed-off-by: Gabor Juhos SVN-Revision: 41639 --- diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index a4c0f2620c5..8d75a5a8ce6 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -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