为什么我的 /run/resolvconf/resolv.conf 在重启时会回滚。Ubuntu 20.04

为什么我的 /run/resolvconf/resolv.conf 在重启时会回滚。Ubuntu 20.04

我已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/baseDHCP 服务器的内容和 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.conf127.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

知道这里可能是什么问题吗?提前致谢。

相关内容