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
This commit is contained in:
Vincent Llorens 2016-10-04 16:57:03 +02:00
parent 485b021305
commit 7fc4a13865
1 changed files with 2 additions and 2 deletions

View File

@ -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