summaryrefslogtreecommitdiff
path: root/src/network/networkd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd.c')
-rw-r--r--src/network/networkd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/network/networkd.c b/src/network/networkd.c
index 2f6a12dbcc..f0e6ad5201 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -42,8 +42,20 @@ int main(int argc, char *argv[]) {
/* Always create the directories people can create inotify
* watches in. */
- mkdir_label("/run/systemd/network/links", 0755);
- mkdir_label("/run/systemd/network/leases", 0755);
+ r = mkdir_label("/run/systemd/network", 0755);
+ if (r < 0)
+ log_error("Could not create runtime directory: %s",
+ strerror(-r));
+
+ r = mkdir_label("/run/systemd/network/links", 0755);
+ if (r < 0)
+ log_error("Could not create runtime directory 'links': %s",
+ strerror(-r));
+
+ r = mkdir_label("/run/systemd/network/leases", 0755);
+ if (r < 0)
+ log_error("Could not create runtime directory 'leases': %s",
+ strerror(-r));
r = manager_new(&m);
if (r < 0) {