![卸载网络管理器后,Networking.service 需要 5 分钟](https://linux22.com/image/894879/%E5%8D%B8%E8%BD%BD%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86%E5%99%A8%E5%90%8E%EF%BC%8CNetworking.service%20%E9%9C%80%E8%A6%81%205%20%E5%88%86%E9%92%9F.png)
我尝试过解决方案在这里无效,使用sudo systemctl edit networking.service
并添加 TimeoutStartSec=10sec。但networking.service 仍然超过 5 分钟。我检查了启动后的变化,networking.service 文件中仍然有超时。既然我使用了,sudo systemd-analyze blame
我可以完全删除吗?networking.service
ifup
sudo systemctl status networking.service
给出:
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/networking.service.d
└─override.conf
Active: failed (Result: timeout) since Tue 2017-07-18 19:16:48 MDT; 30min ago
Docs: man:interfaces(5)
Main PID: 912 (code=killed, signal=TERM)
Jul 18 19:16:48 musty systemd[1]: networking.service: Start operation timed out. Terminating.
Jul 18 19:16:48 musty systemd[1]: networking.service: Main process exited, code=killed, status=15/TERM
Jul 18 19:16:48 musty systemd[1]: Failed to start Raise network interfaces.
Jul 18 19:16:48 musty systemd[1]: networking.service: Unit entered failed state.
Jul 18 19:16:48 musty systemd[1]: networking.service: Failed with result 'timeout'.
Jul 18 19:16:59 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment
Jul 18 19:17:51 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment
Jul 18 19:28:11 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment
Jul 18 19:29:08 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment
Jul 18 19:35:57 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment
答案1
这解决了问题。
打开/etc/init.d/networking
并设置CONFIGURE_INTERFACES=no
答案2
编辑/etc/network/interfaces
如下:(删除其他所有内容..)
auto lo
iface lo inet loopback
保存并重启