mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
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.
This commit is contained in:
@@ -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"
|
||||
echo "systemd-networkd will be disabled..."
|
||||
sleep 30 # Give the user time to see the message
|
||||
systemctl stop systemd-networkd
|
||||
systemctl disable systemd-networkd
|
||||
fi
|
||||
echo "systemd-networkd has been disabled."
|
||||
fi
|
||||
|
||||
if
|
||||
|
||||
Reference in New Issue
Block a user