summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 8eaf101df3..c630ed7ed9 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -55,7 +55,7 @@ int manager_new(Manager **ret) {
return r;
r = sd_bus_default_system(&m->bus);
- if (r < 0)
+ if (r < 0 && r != -ENOENT) /* TODO: drop when we can rely on kdbus */
return r;
m->udev = udev_new();
@@ -288,6 +288,11 @@ int manager_rtnl_listen(Manager *m) {
int manager_bus_listen(Manager *m) {
int r;
+ assert(m->event);
+
+ if (!m->bus) /* TODO: drop when we can rely on kdbus */
+ return 0;
+
r = sd_bus_attach_event(m->bus, m->event, 0);
if (r < 0)
return r;