From 36c4b913e343c2b43aac4e42fe0e771dec7c5642 Mon Sep 17 00:00:00 2001 From: Ian Goodacre Date: Sun, 16 Mar 2025 09:57:53 +0000 Subject: [PATCH] Always disable systemd-networkd if both managers enabled NetworkManager and systemd-networkd should never both be enabled at the same time. In this case, disable systemd-networkd, with message to the user that this is being done. --- .../common/usr/lib/armbian/armbian-firstlogin | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index 521732816..cd01f25c4 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -674,18 +674,11 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then then echo "Both NetworkManager and systemd-networkd services are enabled." echo "This is known to cause problems with network startup." - # If no display manager was found, assume this is a server - # with network managed by systemd-networkd. Otherwise, assume - # it is a workstation with network managed by NetworkManager. - if [[ "${desktop_dm}" == "none" ]]; then - echo "No Display Manager detected: NetworkManager will be disabled" - systemctl stop NetworkManager - systemctl disable NetworkManager - else - echo "${desktop_dm} Display Manager detected: systemd-networkd will be disabled" - systemctl stop systemd-networkd - systemctl disable systemd-networkd - fi + echo "systemd-networkd will be disabled..." + sleep 30 # Give the user time to see the message + systemctl stop systemd-networkd + systemctl disable systemd-networkd + echo "systemd-networkd has been disabled." fi if