odroidc1: set fixed mac address at first boot

This commit is contained in:
Igor Pecovnik 2019-07-25 16:27:17 +02:00
parent 307c1daaa1
commit abd3b20696
No known key found for this signature in database
GPG Key ID: 93D6889F9F0E78D5

View File

@ -120,6 +120,12 @@ case "$1" in
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl restart systemd-networkd
;;
odroidc1)
if [[ -f /boot/boot.ini ]]; then
get_random_mac
sed -i '/setenv rootfstype "ext4"/a setenv ethaddr "'$MACADDR'"' /boot/boot.ini
fi
;;
*)
esac