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;
}
assert(name);
/* Returns true if the unit is inactive or going down */
-
if (!(u = manager_get_unit(m, name)))
return true;
- if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
- return true;
-
- if (u->meta.job && u->meta.job->type == JOB_STOP)
- return true;
-
- return false;
+ return unit_pending_inactive(u);
}
static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {