mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-15 13:00:19 +01:00
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.
This commit is contained in:
parent
5485dbea21
commit
bc28a2b164
2 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue