chiark / gitweb /
swap: don't add mount links for swap devices
[elogind.git] / unit.c
diff --git a/unit.c b/unit.c
index 7779753591921d29ba4f6ff7043b9c18288ff04b..1959b1b940074d0ff23dd81ed3be72d511814f6a 100644 (file)
--- a/unit.c
+++ b/unit.c
@@ -272,9 +272,14 @@ void unit_add_to_dbus_queue(Unit *u) {
         assert(u);
         assert(u->meta.type != _UNIT_TYPE_INVALID);
 
-        if (u->meta.load_state == UNIT_STUB || u->meta.in_dbus_queue || set_isempty(u->meta.manager->subscribed))
+        if (u->meta.load_state == UNIT_STUB || u->meta.in_dbus_queue)
                 return;
 
+        if (set_isempty(u->meta.manager->subscribed)) {
+                u->meta.sent_dbus_new_signal = true;
+                return;
+        }
+
         LIST_PREPEND(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
         u->meta.in_dbus_queue = true;
 }
@@ -1027,7 +1032,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
                         /* The syslog daemon just might have become
                          * available, hence try to connect to it, if
                          * we aren't yet connected. */
-                        log_open_syslog();
+                        log_open();
 
                 if (u->meta.type == UNIT_MOUNT)
                         /* Another directory became available, let's
@@ -1859,7 +1864,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
 
         /* Adds in links to the device node that this unit is based on */
 
-        if (!path_startswith(what, "/dev/") && !path_startswith(what, "/sys/"))
+        if (!is_device_path(what))
                 return 0;
 
         if (!(e = unit_name_build_escape(what+1, NULL, ".device")))