From 7b33243c27c48bea6345aeff9e836c0f2b4f06e9 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Sun, 23 Jun 2024 09:30:17 +0200 Subject: [PATCH] Use netplan mac setting only with systemd-networkd --- packages/bsp/common/usr/lib/armbian/armbian-common | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-common b/packages/bsp/common/usr/lib/armbian/armbian-common index 714e034080..0d0fbe75b2 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-common +++ b/packages/bsp/common/usr/lib/armbian/armbian-common @@ -37,6 +37,12 @@ generate_random_mac () # Set a fixed random MAC for each Ethernet interface set_fixed_mac () { + + # we use random mac routine only with sytemd-network. + if ! grep 'renderer: networkd' /etc/netplan/*.yaml >/dev/null; then + exit 0 + fi + local netplan_config_file="/etc/netplan/20-eth-fixed-mac.yaml" # Initialize a new Netplan config file