Setting MAC for rockchip devices
This commit is contained in:
parent
ae9f2cd8b8
commit
7984848852
@ -242,6 +242,12 @@ case "$1" in
|
||||
echo "ethaddr=$(cat /sys/class/net/eth0/address)" >> /boot/armbianEnv.txt
|
||||
fi
|
||||
;;
|
||||
rockchip)
|
||||
# set MAC for eth0
|
||||
MACADDR=$(printf 'da:42:ea:%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256])
|
||||
sed -i "s/^\#[^ tab]\+hwaddress ether/\thwaddress ether $MACADDR/" /etc/network/interfaces
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
systemctl disable firstrun
|
||||
|
||||
Loading…
Reference in New Issue
Block a user