923a60
From 25112918d6b54fc1136dde2eef24d6c2d33e55b3 Mon Sep 17 00:00:00 2001
923a60
From: Lukas Nykryn <lnykryn@redhat.com>
923a60
Date: Thu, 28 Mar 2019 15:24:58 +0100
923a60
Subject: [PATCH] shutdown: in_container was used before its definition
923a60
923a60
RHEL-only
923a60
Resolves: #1693716
923a60
---
923a60
 src/core/shutdown.c | 4 ++--
923a60
 1 file changed, 2 insertions(+), 2 deletions(-)
923a60
923a60
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
923a60
index 0b0a54a7de..eff1cf2d59 100644
923a60
--- a/src/core/shutdown.c
923a60
+++ b/src/core/shutdown.c
923a60
@@ -296,6 +296,8 @@ int main(int argc, char *argv[]) {
923a60
 
923a60
         cg_get_root_path(&cgroup);
923a60
 
923a60
+        in_container = detect_container(NULL) > 0;
923a60
+
923a60
         use_watchdog = !!getenv("WATCHDOG_USEC");
923a60
 
923a60
         /* lock us into memory */
923a60
@@ -314,8 +316,6 @@ int main(int argc, char *argv[]) {
923a60
         log_info("Sending SIGKILL to remaining processes...");
923a60
         broadcast_signal(SIGKILL, true, false);
923a60
 
923a60
-        in_container = detect_container(NULL) > 0;
923a60
-
923a60
         need_umount = !in_container;
923a60
         need_swapoff = !in_container;
923a60
         need_loop_detach = !in_container;