![为什么我的 /run/resolvconf/resolv.conf 在重启时会回滚。Ubuntu 20.04](https://linux22.com/image/927676/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84%20%2Frun%2Fresolvconf%2Fresolv.conf%20%E5%9C%A8%E9%87%8D%E5%90%AF%E6%97%B6%E4%BC%9A%E5%9B%9E%E6%BB%9A%E3%80%82Ubuntu%2020.04.png)
我已resolvconf
安装并resolvconf -u
正确将内容写入/run/resolvconf/resolv.conf
并/etc/resolv.conf
符号链接到/run/resolvconf/resolv.conf
。但是,一旦我重新启动, 的内容/run/resolvconf/resolv.conf
就会变为空。值得注意的是 的时间戳/run/resolvconf/resolv.conf
会恢复为过去的时间。
预期的行为是它应该使用/etc/resolvconf/resolv.conf.d/base
DHCP 服务器的内容和 DNS 并填充/etc/resolv.conf
hcho@pi-master-1:~$ sudo resolvconf -u
hcho@pi-master-1:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
--Reboot--
hcho@pi-master-1:~$ ls -la /run/resolvconf/resolv.conf
-rw-r--r-- 1 root root 0 Apr 1 17:23 /run/resolvconf/resolv.conf
hcho@pi-master-1:~$ date
Sat Jul 18 05:47:01 UTC 2020
关于我的设置的一些事项:
network-manager
已卸载systemd-networkd
活跃/run/resolvconf/enable-updates
存在systemd-resolved.service
已禁用。启用此功能将填充/etc/resolv.conf
并127.0.0.53
执行不是使用/etc/resolvconf/resolv.conf.d/base
内容。- 我正在使用
netplan
连接WIFIwlan0
接口。
hcho@pi-master-1:~$ systemctl -l | grep -i network
cloud-init-local.service loaded active exited Initial cloud-init job (pre-networking)
networkd-dispatcher.service loaded active running Dispatcher daemon for systemd-networkd
networking.service loaded active exited Raise network interfaces
systemd-networkd-wait-online.service loaded active exited Wait for Network to be Configured
systemd-networkd.service loaded active running Network Service
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-networkd.socket loaded active running Network Service Netlink Socket
network-online.target loaded active active Network is Online
network-pre.target loaded active active Network (Pre)
network.target loaded active active Network
知道这里可能是什么问题吗?提前致谢。