Blame SOURCES/0729-shutdown-in_container-was-used-before-its-definition.patch

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