The spaces in variables have been stripped since commit
551e04f3c9c0
("base-files: strip space and tab characters from ASCII mac address"),
resulting "Vfac_mac " matches nothing. Fix the issue by removing the
space at end.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18150
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
wan_mac=$label_mac
;;
hiwifi,hc5962)
- lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
+ lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac")
label_mac=$lan_mac
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress
;;
hiwifi,hc5962)
- label_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
+ label_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac")
[ "$PHYNBR" = "0" ] && [ -n "$label_mac" ] && \
echo -n "$label_mac" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && [ -n "$label_mac" ] && \