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

Tom Gundersen teg at jklm.no
Thu Jan 16 11:31:26 PST 2014


On Thu, Jan 16, 2014 at 6:13 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> 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...

I extended the comment a bit, but suggestions welcome.

Cheers,

Tom


More information about the systemd-devel mailing list