From 3c826da1f9b5f6c6457fb9be97991fca5fd5d402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= Date: Mon, 11 Nov 2024 14:08:30 +0100 Subject: [PATCH] Silence systemctl messages systemctl status can be noisy if the log has been rotated, showing this message: > Warning: The unit file, source configuration file or drop-ins of > podman.socket changed on disk. Run 'systemctl --user daemon-reload' > to reload units. This can be especially problematic in --quiet mode. This patch fixes that by redirecting stderr of the systemctl call used to get the running state of podman to /dev/null. --- utilities/podman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/podman.sh b/utilities/podman.sh index 40998dc..fdc1d33 100644 --- a/utilities/podman.sh +++ b/utilities/podman.sh @@ -89,6 +89,6 @@ is_podman_user_socket_available() { [ -S "${podman_socket}" ] || return 1 # ... and it should be controlled by the systemd user session. - systemctl status --user podman.socket >/dev/null + systemctl status --user podman.socket &>/dev/null return ${?} }