From: Benjamin Drung Date: Mon, 26 Jan 2026 15:54:40 +0000 (+0100) Subject: test: avoid printing wall message on shutdown X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af80046ebdd5cb6369163451d67bf636eb92131a;p=thirdparty%2Fdracut-ng.git test: avoid printing wall message on shutdown Calling `systemctl poweroff` in the client test rootfs causes this warning: ``` Failed to connect to system scope bus via local transport: No such file or directory ``` Installing D-Bus in the client test rootfs changes the warning to: ``` Failed to set wall message, ignoring: Transport endpoint is not connected Call to PowerOff failed: Transport endpoint is not connected ``` The man page for systemctl poweroff says: "Shut down and power-off the system. This is mostly equivalent to systemctl start poweroff.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users." So call this equivalent command instead to not trying to print wall message on shutdown. --- diff --git a/test/TEST-60-NFS/client-init.sh b/test/TEST-60-NFS/client-init.sh index 11587249e..d3fddbab7 100755 --- a/test/TEST-60-NFS/client-init.sh +++ b/test/TEST-60-NFS/client-init.sh @@ -48,7 +48,7 @@ echo "Powering down." if [ -d /usr/lib/systemd/system ]; then # graceful poweroff - systemctl poweroff + systemctl start poweroff.target --job-mode=replace-irreversibly --no-block else # force immediate poweroff poweroff -f diff --git a/test/TEST-70-ISCSI/client-init.sh b/test/TEST-70-ISCSI/client-init.sh index 864a39158..76f297dbc 100755 --- a/test/TEST-70-ISCSI/client-init.sh +++ b/test/TEST-70-ISCSI/client-init.sh @@ -16,7 +16,7 @@ echo "Powering down." if [ -d /usr/lib/systemd/system ]; then # graceful poweroff - systemctl poweroff + systemctl start poweroff.target --job-mode=replace-irreversibly --no-block else # force immediate poweroff poweroff -f diff --git a/test/TEST-71-ISCSI-MULTI/client-init.sh b/test/TEST-71-ISCSI-MULTI/client-init.sh index 7225245db..3c4386df1 100755 --- a/test/TEST-71-ISCSI-MULTI/client-init.sh +++ b/test/TEST-71-ISCSI-MULTI/client-init.sh @@ -16,7 +16,7 @@ echo "Powering down." if [ -d /usr/lib/systemd/system ]; then # graceful poweroff - systemctl poweroff + systemctl start poweroff.target --job-mode=replace-irreversibly --no-block else # force immediate poweroff poweroff -f diff --git a/test/TEST-72-NBD/client-init.sh b/test/TEST-72-NBD/client-init.sh index 1b425c33b..9dc510620 100755 --- a/test/TEST-72-NBD/client-init.sh +++ b/test/TEST-72-NBD/client-init.sh @@ -21,7 +21,7 @@ echo "Powering down." if [ -d /usr/lib/systemd/system ]; then # graceful poweroff - systemctl poweroff + systemctl start poweroff.target --job-mode=replace-irreversibly --no-block else # force immediate poweroff poweroff -f diff --git a/test/modules.d/70test-root/test-init.sh b/test/modules.d/70test-root/test-init.sh index 904e4a3b8..bb0bb53a0 100755 --- a/test/modules.d/70test-root/test-init.sh +++ b/test/modules.d/70test-root/test-init.sh @@ -42,7 +42,7 @@ echo "Powering down." if [ -d /usr/lib/systemd/system ]; then # graceful poweroff - systemctl poweroff + systemctl start poweroff.target --job-mode=replace-irreversibly --no-block else # force immediate poweroff poweroff -f