Update n-manager.sh

This commit is contained in:
Esteban Mackay Q. 2024-12-13 12:26:23 -05:00
parent 759d2e33fc
commit 43968a0016
1 changed files with 20 additions and 5 deletions

View File

@ -30,17 +30,32 @@ iface lo inet loopback
EOF EOF
fi 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) # Detener y deshabilitar servicios de red previos (networking, dhcpcd)
sudo systemctl daemon-reload
sudo systemctl stop networking sudo systemctl stop networking
sudo systemctl disable networking sudo systemctl disable networking
sudo systemctl stop dhcpcd sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd sudo systemctl disable dhcpcd
sudo systemctl stop wpa_supplicant sudo systemctl start systemd-networkd-wait-online
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
# Habilitar y reiniciar NetworkManager # Habilitar y reiniciar NetworkManager
sudo systemctl enable NetworkManager sudo systemctl enable NetworkManager