From 7fc4a138652f24bd457d9ec45b940aca9f159f0d Mon Sep 17 00:00:00 2001 From: Vincent Llorens Date: Tue, 4 Oct 2016 16:57:03 +0200 Subject: [PATCH] RPM: don't output errors on uninstallation As per RPM documentation, it is advised to not clutter the output when removing packages. This commit fixes this by redirecting the errors to /dev/null, effectively getting rid of errors like: ``` userdel: synergy mail spool (/var/spool/mail/synergy) not found userdel: synergy home directory (/home/synergy) not found groupdel: group 'synergy' does not exist ``` Change-Id: I41508c13e971b3740d3e37448b62d5a9b841db37 --- packaging/rpm/python-synergy.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm/python-synergy.spec b/packaging/rpm/python-synergy.spec index d8a65bc..98df198 100755 --- a/packaging/rpm/python-synergy.spec +++ b/packaging/rpm/python-synergy.spec @@ -86,8 +86,8 @@ exit 0 %postun %systemd_postun_with_restart synergy.service if [ "$1" = 0 ]; then - userdel -r synergy || true - groupdel synergy || true + userdel -r synergy 2> /dev/null || true + groupdel synergy 2> /dev/null || true fi %changelog