<div dir="ltr"><div dir="ltr">Hi,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 30, 2023 at 3:48 AM Tom Isaacson <<a href="mailto:tom.isaacson@teknique.com">tom.isaacson@teknique.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm trying to setup a Yocto build using NetworkManager v1.22.16 and<br>
systemd 244.5. <a href="https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf" rel="noreferrer" target="_blank">https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf</a><br>
recommends I setup /etc/resolv.conf as a symbolic link to<br>
/var/run/systemd/resolve/stub-resolv.conf. Initially it was linked to<br>
/etc/resolv-conf.NetworkManager but I've fixed that by adding a<br>
networkmanager_%.bbappend file with:<br>
ALTERNATIVE_${PN} = ""<br>
<br>
But now I find /etc/resolv.conf is a symbolic link to<br>
/etc/resolv-conf.systemd, which is itself a symbolic link to<br>
/run/systemd/resolve/resolv.conf. I'm not sure where this is coming<br>
from, possibly after the device boots. Everything seems to work so is<br>
this ok? Or will NetworkManager get confused by this?<br></blockquote><br><div>NetworkManager never creates /etc/resolv.conf to be a symlink, because a symlink is taken as administrative action that indicates what the user wants (and not something that NetworkManager would overwrite). This was done by somebody else.</div><div><br></div><div>NetworkManager can autodetect `dns=systemd-resolved`, based on whether `/etc/resolv.conf` is a symlink to the well-known resolv.conf files of systemd-resolved. See `/ETC/RESOLV.CONF` in `man systemd-resolved`. If the symlink points somewhere else and the autodetection doesn't work, you can explicitly set `dns=systemd-resolved` in `NetworkManager.conf`.</div><div><br></div><div>Basically, read `man NetworkManager.conf` about `dns` and `rc-manager` settings, and configure whatever works for you best. Usually, the default settings and autodetection gives the sensible behavior and you don't need to explicitly set those options -- but you may.<br></div><div><br></div><div>Thomas<br></div></div></div>