summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@new-host-3.home>2020-04-03 22:35:22 -0500
committerLennart Poettering <lennart@poettering.net>2020-04-07 15:27:50 +0200
commitf9d29f6d06058104ac88431495b36bc5edc45843 (patch)
tree8ebe3555309434a9e3fa7d2b58a51b17ed3c8f25
parente6b68254c22064ed4a159ea5a1405423774e09f6 (diff)
downloadsystemd-f9d29f6d06058104ac88431495b36bc5edc45843.tar.gz
fix manager_state
-rw-r--r--src/core/manager.c10
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);