As soon as we start running a test, we want pid 1 to stop showing
status messages so let's tell pid 1 to stop showing status messages.
(cherry picked from commit
070de658a9f2bf48d26035ddbe861f79dfff2be4)
case "$1" in
setup)
+ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager SetShowStatus s no
+
if [[ -f "$STATE_DIRECTORY/inprogress" ]]; then
exit 0
fi
touch "$STATE_DIRECTORY/inprogress"
;;
finalize)
+ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager SetShowStatus s auto
+
# If we're rebooting, the test does a reboot as part of its execution and we shouldn't remove /inprogress.
if ! [[ "$(systemctl list-jobs)" =~ reboot.target|kexec.target|soft-reboot.target ]]; then
rm -f "$STATE_DIRECTORY/inprogress"