Commit bc28a2b1 authored by Thomas Haller's avatar Thomas Haller

man: clarify main.rc-manager=file behavior for resolv.conf as dangling symlink

It's not clear whether this was desired behavior. However, it was
behavior for a long time, so we probably should not change it.

Just document what happens with dangling symlinks.
parent 5485dbea
......@@ -366,8 +366,9 @@ no-auto-default=*
a symlink.</para>
<para><literal>file</literal>: NetworkManager will write
<filename>/etc/resolv.conf</filename> as file. If it finds
a symlink, it will follow the symlink and update the target
instead.</para>
a symlink to an existing target, it will follow the symlink and
update the target instead. If the symlink's target does not exist,
the symlink will be replaced by a file.</para>
<para><literal>resolvconf</literal>: NetworkManager will run
resolvconf to update the DNS configuration.</para>
<para><literal>netconfig</literal>: NetworkManager will run
......
......@@ -797,6 +797,10 @@ update_resolv_conf (NMDnsManager *self,
GError *local = NULL;
if (rc_manager == NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE) {
/* Note that if /etc/resolv.conf is a dangling symlink, realpath()
* will return %NULL, and thus below we will replace the symlink
* with a file. This is the only case, in which NetworkManager
* replaces an existing symlink with a file.*/
rc_path_real = realpath (rc_path, NULL);
if (rc_path_real)
rc_path = rc_path_real;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment