shutdown: log on container exit
authorAnita Zhang <the.anitazha@gmail.com>
Fri, 5 Mar 2021 04:00:05 +0000 (20:00 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 May 2021 17:26:31 +0000 (19:26 +0200)
(cherry picked from commit 016f36ae72611210d6517b37429bfbdc26c5e31c)
(cherry picked from commit d51d8172d66506448fb1612c85df7b452264e08e)

src/shutdown/shutdown.c

index c1fdc885afb559313232e1a284545072fb647ed5..06b6618ff4c94cd176df81bec0ebba8b09ccbb54 100644 (file)
@@ -559,8 +559,10 @@ int main(int argc, char *argv[]) {
                 sync_with_progress();
 
         if (streq(arg_verb, "exit")) {
-                if (in_container)
+                if (in_container) {
+                        log_info("Exiting container.");
                         return arg_exit_code;
+                }
 
                 cmd = RB_POWER_OFF; /* We cannot exit() on the host, fallback on another method. */
         }