bundles/apt: log stdout and stderr separately in upgrade-and-reboot
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-03-26 09:02:48 +01:00
parent 4bd61fedde
commit 65490b1d20
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -5,13 +5,10 @@
# "journalctl -rat upgrade-and-reboot". # "journalctl -rat upgrade-and-reboot".
if which logger >/dev/null 2>&1 if which logger >/dev/null 2>&1
then then
# Dump stdout to logger, which will then put everything into the # Dump stdout and stderr to logger, which will then put everything
# journal. # into the journal.
exec 1> >(logger -t upgrade-and-reboot -p user.info) exec 1> >(logger -t upgrade-and-reboot -p user.info)
exec 2> >(logger -t upgrade-and-reboot -p user.error)
# Make stdout and stderr the same. We don't care about the
# distinction anyway.
exec 2>&1
fi fi
statusfile="/var/tmp/unattended_upgrades.status" statusfile="/var/tmp/unattended_upgrades.status"