mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
rockchip: add generate mac script support for multiple mmcblk devices
This commit is contained in:
parent
d5fdefb31a
commit
69f0ac32c1
@ -26,7 +26,7 @@ rockchip_setup_interfaces()
|
||||
|
||||
nanopi_r2s_generate_mac()
|
||||
{
|
||||
local sd_hash=$(sha256sum /sys/class/block/mmcblk0/device/cid)
|
||||
local sd_hash=$(sha256sum /sys/class/block/mmcblk*/device/cid | head -n 1)
|
||||
local mac_base=$(macaddr_canonicalize "$(echo "${sd_hash}" | dd bs=1 count=12 2>/dev/null)")
|
||||
echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user