chiark / gitweb /
service: add generic LSB provides handling for facilities
[elogind.git] / src / manager.c
index bc589bacc7ffd8e1c17f0d6ac7d2e8b8b2741a1a..3a0ba487cf18b0ceebc876d464d1ae45c0d556fd 100644 (file)
@@ -982,14 +982,14 @@ static int transaction_verify_order_one(Manager *m, Job *j, Job *from, unsigned
 
 
                 if (delete) {
-                        log_warning("Breaking ordering cycle by deleting job %s/%s", k->unit->meta.id, job_type_to_string(k->type));
+                        log_warning("Breaking ordering cycle by deleting job %s/%s", delete->unit->meta.id, job_type_to_string(delete->type));
                         transaction_delete_unit(m, delete->unit);
                         return -EAGAIN;
                 }
 
                 log_error("Unable to break cycle");
 
-                dbus_set_error(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, "Transaction order is cyclic. See logs for details.");
+                dbus_set_error(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, "Transaction order is cyclic. See system logs for details.");
                 return -ENOEXEC;
         }
 
@@ -1403,7 +1403,7 @@ static int transaction_add_job_and_dependencies(
         }
 
         if (type != JOB_STOP && unit->meta.load_state == UNIT_ERROR) {
-                dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load: %s. You might find more information in the logs.",
+                dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load: %s. You might find more information in the system logs.",
                                unit->meta.id,
                                strerror(-unit->meta.load_error));
                 return -EINVAL;
@@ -2584,6 +2584,19 @@ int manager_set_console(Manager *m, const char *console) {
         return 0;
 }
 
+bool manager_unit_pending_inactive(Manager *m, const char *name) {
+        Unit *u;
+
+        assert(m);
+        assert(name);
+
+        /* Returns true if the unit is inactive or going down */
+        if (!(u = manager_get_unit(m, name)))
+                return true;
+
+        return unit_pending_inactive(u);
+}
+
 static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {
         [MANAGER_SYSTEM] = "system",
         [MANAGER_SESSION] = "session"