On Thu, Jan 16, 2014 at 6:13 PM, Lennart Poettering <lenn...@poettering.net> wrote: > On Sun, 12.01.14 06:32, Tom Gundersen (tome...@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 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel