chiark / gitweb /
unit: consider only_by_dependency setting when clients ask whether a unit is startable
[elogind.git] / src / dbus-unit.c
index 66b7ae829757edc24800d9e04d7ddbd9f077f8d6..ce34130993872bf018316a1d7003e45724e4a03e 100644 (file)
@@ -128,7 +128,8 @@ int bus_unit_append_can_start(Manager *m, DBusMessageIter *i, const char *proper
         assert(property);
         assert(u);
 
-        b = unit_can_start(u);
+        b = unit_can_start(u) &&
+                !u->meta.only_by_dependency;
 
         if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
                 return -ENOMEM;