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
|
Name: clevis
|
||||||
Version: 14
|
Version: 14
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Automated decryption framework
|
Summary: Automated decryption framework
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -118,13 +118,13 @@ desktop-file-validate \
|
|||||||
%meson_test
|
%meson_test
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group %{name} >/dev/null || groupadd -r %{name}
|
getent group %{name} >/dev/null || groupadd -r %{name} &>/dev/null
|
||||||
getent passwd %{name} >/dev/null || \
|
getent passwd %{name} >/dev/null || \
|
||||||
useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
|
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.
|
# Add clevis user to tss group.
|
||||||
if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
|
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
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -184,6 +184,10 @@ exit 0
|
|||||||
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-4
|
||||||
- Backport upstream PR#230 - clevis-luks-askpass now exits cleanly
|
- Backport upstream PR#230 - clevis-luks-askpass now exits cleanly
|
||||||
when receives a SIGTERM
|
when receives a SIGTERM
|
||||||
|
Loading…
Reference in New Issue
Block a user