base-files: enable get_mac_ascii() to handle redundant strings
authorShiji Yang <yangshiji66@qq.com>
Fri, 13 Dec 2024 05:30:38 +0000 (13:30 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 4 Jan 2025 15:20:46 +0000 (16:20 +0100)
commit3410ad2f40c085e5db7a71f6ae4b80734826a1e3
tree64623c4e81b187fab8adef4624b24cdb8cedf77b
parent58056df84f6dfd0c86d45e2e22d715a3c501ce1e
base-files: enable get_mac_ascii() to handle redundant strings

The function get_mac_ascii() will fail when there are two or more
same MAC address variable names in the mtd partition. Only retain
the first variable to workaround this rare situation.

Fixes: https://github.com/openwrt/openwrt/issues/17236
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>
package/base-files/files/lib/functions/system.sh