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>
Thu, 6 May 2021 11:17:16 +0000 (13:17 +0200)
commitbaa8bd89efa752633805c5b04b02d1dbde5ea0bb
treeb0426e8a70b73f1deb13f2c28b9f287ae6291ada
parent5dc957a6d8bf0830e910bea6c0bef5c952bf78c2
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)
src/shutdown/shutdown.c