From 9eebd6f8f34d5decfea7545f0439629bede3aba4 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..174fd5a 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 2>/dev/null return ${?} }