]> err.no Git - systemd/commitdiff
manager: always allow stopping of units that failed to load
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Jul 2010 18:07:00 +0000 (20:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Jul 2010 18:07:00 +0000 (20:07 +0200)
src/manager.c

index cdcd6935cdfe5e6d5b3483b5d82d3437781db114..58848356ea9aec577068650514cfe5b4df30b766 100644 (file)
@@ -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;
         }