[systemd-devel] resolved and bind-mount of /etc/resolv.conf

Igor Bukanov igor at mir2.org
Fri Jan 15 01:33:37 PST 2016


Hi,

currently if one runs systemd-resolved, then  /etc/resolv.conf should
be symlinked to /run/systemd/resolve/resolv.conf . Is  it possible
instead to add an option for resolved to bind-mount /etc/resolv.conf
into the real file when it starts?

This way stopping or disabling resolved will not require to update the
symlink and parallel installation of 2 resolvers is possible when the
decision to use a particular one can be done at runtime with no
changes in /etc.

I suppose I already can do with service ExecStartPost, ExecStart hooks
for resolved, but this is rather hackish as I do not know if resolved
updates the file in place (which is compatible with bind-mount) or via
rename of a temporary (which is not).

Regards, Igor


More information about the systemd-devel mailing list