summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-13 20:07:00 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-13 20:07:00 +0200
commit3dda9fc3a738241e42df43dbebf9e479e5ad1da8 (patch)
tree0d01eeb77170a6872eec7eb464efadd5ea071435
parent1d2e23ab72b15524ffc009e0553c4b8d08f073b8 (diff)
manager: always allow stopping of units that failed to load
-rw-r--r--src/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index cdcd6935cd..58848356ea 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1328,7 +1328,8 @@ static int transaction_add_job_and_dependencies(
assert(type < _JOB_TYPE_MAX);
assert(unit);
- if (unit->meta.load_state != UNIT_LOADED) {
+ if (type != JOB_STOP &&
+ unit->meta.load_state != UNIT_LOADED) {
dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load. See logs for details.", unit->meta.id);
return -EINVAL;
}