summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-06-03 18:20:21 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2015-06-03 18:26:51 +0200
commit0e09d5e4e514e5ab3710119d9d49af345a9a6359 (patch)
treea0ed1251ac775143634b2b203aa8af214bd8b52c
parent14316f794ea37e8790edb0ae2626dc1eebaf9ea8 (diff)
downloadptxdist-0e09d5e4e514e5ab3710119d9d49af345a9a6359.tar.gz
ptxdist-0e09d5e4e514e5ab3710119d9d49af345a9a6359.tar.xz
systemd: fix timesyncd without networkd
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/systemd-220/0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch29
-rw-r--r--patches/systemd-220/series3
2 files changed, 31 insertions, 1 deletions
diff --git a/patches/systemd-220/0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch b/patches/systemd-220/0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch
new file mode 100644
index 000000000..87fda6540
--- /dev/null
+++ b/patches/systemd-220/0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch
@@ -0,0 +1,29 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 3 Jun 2015 17:37:45 +0200
+Subject: [PATCH] sd-network: ignore missing directory if networkd is disabled
+
+sd_network_monitor is used by timesyncd and resolved. Both can be enabled
+while networkd is disabled. /run/systemd/netif/links/ only exists if
+networkd is enabled at build-time, so ignore the corresponding error if it
+is disabled.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ src/libsystemd/sd-network/sd-network.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
+index db1f6997cbba..861f33b3b574 100644
+--- a/src/libsystemd/sd-network/sd-network.c
++++ b/src/libsystemd/sd-network/sd-network.c
+@@ -310,8 +310,10 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category
+ if (!category || streq(category, "links")) {
+ k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
+ if (k < 0) {
++#ifdef ENABLE_NETWORKD
+ safe_close(fd);
+ return -errno;
++#endif
+ }
+
+ good = true;
diff --git a/patches/systemd-220/series b/patches/systemd-220/series
index f82220a34..32cf35293 100644
--- a/patches/systemd-220/series
+++ b/patches/systemd-220/series
@@ -8,4 +8,5 @@
0006-random-util-guard-including-sys-auxv.h-with-the-corr.patch
0007-missing-add-more-btrfs-defines.patch
0008-missing-define-O_PATH-and-AT_EMPTY_PATH.patch
-# 1fd3037015140a7bf9cd2891f4878b07 - git-ptx-patches magic
+0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch
+# ffc145bfa13923d36a62a2a3e80169d6 - git-ptx-patches magic