Set fixed MAC for Nanopi R2S (#1893)

Needed to avoid changing IP on reboot

Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
This commit is contained in:
Igor Pečovnik 2020-04-17 09:10:57 +02:00 committed by GitHub
parent 2a3d8a8f99
commit d359596da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,13 @@ case "$1" in
esac
# varios temporary hardware workarounds
if [[ $BOARD_NAME == "Nanopi R2S" ]]; then
get_random_mac
sed -i "s/^auto eth0/auto eth0\n\thwaddress $MACADDR/" /etc/network/interfaces
get_random_mac
sed -i "s/^auto lan0/auto lan0\n\thwaddress $MACADDR/" /etc/network/interfaces
fi
[[ $LINUXFAMILY == rk3399 || $LINUXFAMILY == rockchip64 ]] && set_fixed_mac
[[ $BRANCH == dev && $LINUXFAMILY == rockchip ]] && set_fixed_mac
[[ $BRANCH == current && $LINUXFAMILY == odroidc1 ]] && set_fixed_mac