shutdown: set always_reopen_console
authorAnita Zhang <the.anitazha@gmail.com>
Fri, 5 Mar 2021 03:56:16 +0000 (19:56 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 May 2021 18:15:11 +0000 (20:15 +0200)
commit21697fa7027739dc673f4df2332368a88b8d735d
tree0a273bc555c848a04980f94afbd19cfdce298254
parentc7ef99035b80b36ec7fc2b9daab4b63736bcc8d2
shutdown: set always_reopen_console

Back in v232 systemd-shutdown would log to /dev/console. However after
the addition of always_reopen_console (v233) it would log to STDERR.
This caused some debugging issues as container systemd-shutdown logs
weren't being logged to console as the arg `--log-target=console` suggested.

Since it appears that always_reopen_console was intended for pid1, set
it in systemd-shutdown as well so logs will go to /dev/console.

(cherry picked from commit f975f1cc748929942188ae1490cf8480f8a64877)
(cherry picked from commit baa8bd89efa752633805c5b04b02d1dbde5ea0bb)
(cherry picked from commit 499bea62091f7b672f0e296ec67623a155e2a1d6)
src/shutdown/shutdown.c