From 1d712f8acf96060d022b215d51aee4a13d9f84ca Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Nov 15 2021 12:47:07 +0000 Subject: Supress errors on selinux systems See https://bugzilla.redhat.com/show_bug.cgi?id=2023332. https://bugzilla.redhat.com/show_bug.cgi?id=2023332 is also related. --- diff --git a/triggers.systemd b/triggers.systemd index 8827e0f..5929035 100644 --- a/triggers.systemd +++ b/triggers.systemd @@ -17,7 +17,11 @@ /usr/lib/systemd/systemd-update-helper system-reload-restart || : %transfiletriggerin -P 900899 -- /usr/lib/systemd/user /etc/systemd/user -/usr/lib/systemd/systemd-update-helper user-reload-restart || : +if selinuxenabled &>/dev/null; then + /usr/lib/systemd/systemd-update-helper user-reload-restart 2>/dev/null || : +else + /usr/lib/systemd/systemd-update-helper user-reload-restart || : +fi %transfiletriggerpostun -P 1000100 -- /usr/lib/systemd/system /etc/systemd/system # On removal, we need to run daemon-reload after any units have been @@ -29,7 +33,11 @@ %transfiletriggerpostun -P 1000099 -- /usr/lib/systemd/user /etc/systemd/user # Execute daemon-reload in user managers. -/usr/lib/systemd/systemd-update-helper user-reload || : +if selinuxenabled &>/dev/null; then + /usr/lib/systemd/systemd-update-helper user-reload 2>/dev/null || : +else + /usr/lib/systemd/systemd-update-helper user-reload || : +fi %transfiletriggerpostun -P 10000 -- /usr/lib/systemd/system /etc/systemd/system # We restart remaining system services that should be restarted here. @@ -37,7 +45,11 @@ %transfiletriggerpostun -P 9999 -- /usr/lib/systemd/user /etc/systemd/user # We restart remaining user services that should be restarted here. -/usr/lib/systemd/systemd-update-helper user-restart || : +if selinuxenabled &>/dev/null; then + /usr/lib/systemd/systemd-update-helper user-restart 2>/dev/null || : +else + /usr/lib/systemd/systemd-update-helper user-restart || : +fi %transfiletriggerin -P 1000700 -- /usr/lib/sysusers.d # This script will process files installed in /usr/lib/sysusers.d to create