Suppress output in %pre scriptlet when adjusting users/groups
This approach is also used in other packages, e.g., systemd. Resolves: rhbz#1876729
This commit is contained in:
parent
fe15ade0e2
commit
6e9ce1a014
12
clevis.spec
12
clevis.spec
@ -1,6 +1,6 @@
|
||||
Name: clevis
|
||||
Version: 14
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Automated decryption framework
|
||||
|
||||
License: GPLv3+
|
||||
@ -118,13 +118,13 @@ desktop-file-validate \
|
||||
%meson_test
|
||||
|
||||
%pre
|
||||
getent group %{name} >/dev/null || groupadd -r %{name}
|
||||
getent group %{name} >/dev/null || groupadd -r %{name} &>/dev/null
|
||||
getent passwd %{name} >/dev/null || \
|
||||
useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
|
||||
-c "Clevis Decryption Framework unprivileged user" %{name}
|
||||
-c "Clevis Decryption Framework unprivileged user" %{name} &>/dev/null
|
||||
# Add clevis user to tss group.
|
||||
if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
|
||||
usermod -a -G tss %{name}
|
||||
usermod -a -G tss %{name} &>/dev/null
|
||||
fi
|
||||
exit 0
|
||||
|
||||
@ -184,6 +184,10 @@ exit 0
|
||||
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
||||
|
||||
%changelog
|
||||
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-5
|
||||
- Suppress output in pre scriptlet when adjusting users/groups
|
||||
Resolves: rhbz#1876729
|
||||
|
||||
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-4
|
||||
- Backport upstream PR#230 - clevis-luks-askpass now exits cleanly
|
||||
when receives a SIGTERM
|
||||
|
Loading…
Reference in New Issue
Block a user