From abd3b20696bd2b05df9c717d4783441dc2394ff3 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 25 Jul 2019 16:27:17 +0200 Subject: [PATCH] odroidc1: set fixed mac address at first boot --- packages/bsp/common/usr/lib/armbian/armbian-firstrun | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstrun b/packages/bsp/common/usr/lib/armbian/armbian-firstrun index 595ca05f98..d199f55791 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstrun +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstrun @@ -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