diff --git a/install/n-manager.sh b/install/n-manager.sh index 9c114df..9a73938 100644 --- a/install/n-manager.sh +++ b/install/n-manager.sh @@ -30,17 +30,32 @@ iface lo inet loopback EOF fi + sudo systemctl stop systemd-networkd-wait-online + sudo cat > /lib/systemd/system/systemd-networkd-wait-online.service <<- "EOF" +[Unit] +Description=Wait for NetworkManager to configure the network +Documentation=man:nm-online +DefaultDependencies=no +Before=network.target +After=NetworkManager.service +Wants=NetworkManager.service +[Service] +Type=oneshot +ExecStart=/usr/bin/nm-online -s -q +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target + +EOF # Detener y deshabilitar servicios de red previos (networking, dhcpcd) + sudo systemctl daemon-reload sudo systemctl stop networking sudo systemctl disable networking sudo systemctl stop dhcpcd sudo systemctl disable dhcpcd - sudo systemctl stop wpa_supplicant - sudo systemctl disable wpa_supplicant - sudo rm /lib/systemd/system/wpa_supplicant.service - sudo systemctl stop systemd-networkd-wait-online - sudo systemctl disable systemd-networkd-wait-online + sudo systemctl start systemd-networkd-wait-online # Habilitar y reiniciar NetworkManager sudo systemctl enable NetworkManager