Spaces and tabs are widely used in variable definitions. We have to
remove them to ensure that get_mac_ascii() works properly.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17262
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
local key="$2"
local mac_dirty
- mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p' | head -n 1)
+ mac_dirty=$(strings "$part" | tr -d ' \t' | sed -n 's/^'"$key"'=//p' | head -n 1)
# "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"