diff options
author | root <root@new-host-3.home> | 2020-04-03 22:35:22 -0500 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-04-07 15:27:50 +0200 |
commit | f9d29f6d06058104ac88431495b36bc5edc45843 (patch) | |
tree | 8ebe3555309434a9e3fa7d2b58a51b17ed3c8f25 | |
parent | e6b68254c22064ed4a159ea5a1405423774e09f6 (diff) | |
download | systemd-f9d29f6d06058104ac88431495b36bc5edc45843.tar.gz |
fix manager_state
-rw-r--r-- | src/core/manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 2ae1e3f4d9..4a11054e05 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -4247,6 +4247,11 @@ ManagerState manager_state(Manager *m) { assert(m); + /* Is the special shutdown target active or queued? If so, we are in shutdown state */ + u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET); + if (u && unit_active_or_pending(u)) + return MANAGER_STOPPING; + /* Did we ever finish booting? If not then we are still starting up */ if (!MANAGER_IS_FINISHED(m)) { @@ -4257,11 +4262,6 @@ ManagerState manager_state(Manager *m) { return MANAGER_STARTING; } - /* Is the special shutdown target active or queued? If so, we are in shutdown state */ - u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET); - if (u && unit_active_or_pending(u)) - return MANAGER_STOPPING; - if (MANAGER_IS_SYSTEM(m)) { /* Are the rescue or emergency targets active or queued? If so we are in maintenance state */ u = manager_get_unit(m, SPECIAL_RESCUE_TARGET); |