[systemd-devel] [systemd-commits] 6 commits - Makefile.am src/bus-proxyd src/network TODO

Lennart Poettering lennart at poettering.net
Thu Jan 16 09:13:25 PST 2014


On Sun, 12.01.14 06:32, Tom Gundersen (tomegun at kemper.freedesktop.org) wrote:

> +        r = mkdir_safe_label("/run/systemd/network", 0755, 0, 0);
> +        if (r < 0)
> +                return r;
> +
> +        r = fopen_temporary("/run/systemd/network/resolv.conf", &f, &temp_path);
> +        if (r < 0)
> +                return r;
> +
> +        fchmod(fileno(f), 0644);
> +
> +        fputs("# This file is managed by systemd-networkd(8). Do not
> edit.\n", f);

I'd propose we add a longer comment here, explaining the situation. For
example, we should tell admins that the way to edit this file is to
replace the symlink in /etc by a real file, and edit that, thus opting
out of the automatic handling of networkd.

Also, we should make clear in the comment I think, that the real file is
not API other programs should ever reference, i.e. people should not
assume that we simply moved /etc/resolv.conf to /run and kept all other
semantics, and they can just happily read that file directly. They
should not do that, they should always use the /etc/resolv.conf name and
nothing else...

LLennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list