From 65490b1d20648ac3b938ac1d13c343ac2de4c52f Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 26 Mar 2021 09:02:48 +0100 Subject: [PATCH] bundles/apt: log stdout and stderr separately in upgrade-and-reboot --- bundles/apt/files/upgrade-and-reboot | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bundles/apt/files/upgrade-and-reboot b/bundles/apt/files/upgrade-and-reboot index 2f9acf9..269bb55 100644 --- a/bundles/apt/files/upgrade-and-reboot +++ b/bundles/apt/files/upgrade-and-reboot @@ -5,13 +5,10 @@ # "journalctl -rat upgrade-and-reboot". if which logger >/dev/null 2>&1 then - # Dump stdout to logger, which will then put everything into the - # journal. + # Dump stdout and stderr to logger, which will then put everything + # into the journal. exec 1> >(logger -t upgrade-and-reboot -p user.info) - - # Make stdout and stderr the same. We don't care about the - # distinction anyway. - exec 2>&1 + exec 2> >(logger -t upgrade-and-reboot -p user.error) fi statusfile="/var/tmp/unattended_upgrades.status"