dm0 / rpms / systemd

Forked from rpms/systemd 5 years ago
Clone
46a556f
From 4adb14d65c1125dfeff2fe5a44269baba67dfad3 Mon Sep 17 00:00:00 2001
e3e6fc8
From: Lennart Poettering <lennart@poettering.net>
e3e6fc8
Date: Mon, 6 May 2013 22:28:39 +0200
e3e6fc8
Subject: [PATCH] core: unit_inactive_or_pending() should actually do as it
e3e6fc8
 claims (cherry picked from commit d956ac29a1b8120e83922fa8e75cdd8f6e562529)
e3e6fc8
e3e6fc8
---
e3e6fc8
 src/core/unit.c | 3 +++
e3e6fc8
 1 file changed, 3 insertions(+)
e3e6fc8
e3e6fc8
diff --git a/src/core/unit.c b/src/core/unit.c
e3e6fc8
index d5bea83..502fbf1 100644
e3e6fc8
--- a/src/core/unit.c
e3e6fc8
+++ b/src/core/unit.c
e3e6fc8
@@ -2652,6 +2652,9 @@ bool unit_inactive_or_pending(Unit *u) {
e3e6fc8
 
e3e6fc8
         /* Returns true if the unit is inactive or going down */
e3e6fc8
 
e3e6fc8
+        if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
e3e6fc8
+                return true;
e3e6fc8
+
e3e6fc8
         if (unit_stop_pending(u))
e3e6fc8
                 return true;
e3e6fc8