Re: Writing resolv.conf issues with broken symlink



On Thu, 2018-05-31 at 19:02 +0000, Matthew Starr wrote:
I am building NetworkManager 1.8.0 using buildroot with SysV init on
an ARM embedded device.  Buildroot has the /etc/resolv.conf file as a
symlink that points to /tmp/resolv.conf.  When I use NetworkManager
with this resolv.conf symlink configuration, DNS lookups do no work
because NetworkManger is not writing to the resolv.conf file or the
file pointed to by the symlink.

I tried updating the NetworkManager.conf file to include "rc-
manager=file" since the man page states that NetworkManager will then
follow the symlink and write the contents of the resolv.conf
there.  Unfortunately this does not work when the destination file
the symlink points to does not exist.  In this situation the symlink
points to a file in /tmp which is a tmpfs file system (RAM based) and
wiped clean on each boot to help support  a read-only root file
system or doing minimal writes to the root file system.

Is there a specific reason NetworkManager doesn't create the file the
/etc/resolv.conf symlink points to if it doesn't exist?  If there
isn't a reason, could NetworkManager be updated to create the file
pointed to by the /etc/resolv.conf symlink?

Hi,

with "file" mode, NetworkManager should follow the symlink and write
the file (if it doesn't exist). It wouldn't create the necessary parent
directories, but since you have /tmp/resolv.conf, this shouldn't apply.

Odd, if that doesn't work. Would need some investigation. Does the
logfile say anything with level=TRACE?

You could also have /etc/resolv.conf as symlink to
/var/run/NetworkManager/resolv.conf and leave "symlink" setting.


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]