[systemd-commits] 2 commits - man/systemd-resolved.service.xml src/resolve tmpfiles.d/systemd.conf
Tom Gundersen
tomegun at kemper.freedesktop.org
Mon Jun 2 06:31:02 PDT 2014
man/systemd-resolved.service.xml | 4 ++--
src/resolve/resolved-manager.c | 8 ++++----
src/resolve/resolved.c | 2 +-
tmpfiles.d/systemd.conf | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit b686acb27ea4de042320fa196cfb14e08f30165b
Author: Tom Gundersen <teg at jklm.no>
Date: Mon Jun 2 15:13:30 2014 +0200
resolved: move resolv.conf to resolved's runtime dir
diff --git a/man/systemd-resolved.service.xml b/man/systemd-resolved.service.xml
index cd73cb7..ed1f5a2 100644
--- a/man/systemd-resolved.service.xml
+++ b/man/systemd-resolved.service.xml
@@ -58,7 +58,7 @@
<para><command>systemd-networkd</command> is a system
service that manages network name resolution. It does so by
- generating <filename>/run/systemd/network/resolv.conf</filename>,
+ generating <filename>/run/systemd/resolve/resolv.conf</filename>,
which may be symlinked from <filename>/etc/resolv.conf</filename>.
The contents is generated from the global settings in
<citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
@@ -67,7 +67,7 @@
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>
- <para>Note that <filename>/run/systemd/network/resolv.conf</filename>
+ <para>Note that <filename>/run/systemd/resolve/resolv.conf</filename>
should not be used directly, but only through a symlink from
<filename>/etc/resolv.conf</filename>.</para>
</refsect1>
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index ae17399..3ed0603 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -30,7 +30,6 @@
#include "dhcp-lease-internal.h"
#include "network-internal.h"
#include "conf-parser.h"
-#include "mkdir.h"
static int set_fallback_dns(Manager *m, const char *string) {
char *word, *state;
@@ -192,6 +191,7 @@ static void append_dns(FILE *f, void *dns, unsigned char family, unsigned *count
}
int manager_update_resolv_conf(Manager *m) {
+ const char *path = "/run/systemd/resolve/resolv.conf";
_cleanup_free_ char *temp_path = NULL;
_cleanup_fclose_ FILE *f = NULL;
_cleanup_free_ unsigned *indices = NULL;
@@ -201,7 +201,7 @@ int manager_update_resolv_conf(Manager *m) {
assert(m);
- r = fopen_temporary("/run/systemd/network/resolv.conf", &f, &temp_path);
+ r = fopen_temporary(path, &f, &temp_path);
if (r < 0)
return r;
@@ -263,9 +263,9 @@ int manager_update_resolv_conf(Manager *m) {
fflush(f);
- if (ferror(f) || rename(temp_path, "/run/systemd/network/resolv.conf") < 0) {
+ if (ferror(f) || rename(temp_path, path) < 0) {
r = -errno;
- unlink("/run/systemd/network/resolv.conf");
+ unlink(path);
unlink(temp_path);
return r;
}
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c
index 82f43d6..2eaff60 100644
--- a/src/resolve/resolved.c
+++ b/src/resolve/resolved.c
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
}
/* Always create the directory where resolv.conf will live */
- r = mkdir_label("/run/systemd/network", 0755);
+ r = mkdir_label("/run/systemd/resolve", 0755);
if (r < 0)
log_error("Could not create runtime directory: %s",
strerror(-r));
commit 01501939d5f608541c1ea98fe2da84d841f9c9bc
Author: Tom Gundersen <teg at jklm.no>
Date: Mon Jun 2 15:05:05 2014 +0200
tmpfiles: systemd.conf - fix ownership of network directories
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
index 7efab0e..1fce514 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf
@@ -21,9 +21,9 @@ d /run/systemd/sessions 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
-d /run/systemd/network 0755 root root -
-d /run/systemd/network/links 0755 root root -
-d /run/systemd/network/leases 0755 root root -
+d /run/systemd/network 0755 systemd-network systemd-network -
+d /run/systemd/network/links 0755 systemd-network systemd-network -
+d /run/systemd/network/leases 0755 systemd-network systemd-network -
m /var/log/journal 2755 root systemd-journal - -
Z /var/log/journal/%m 2755 root systemd-journal - -
More information about the systemd-commits
mailing list