Version 2.5.9-3 with getent and exit 0

This commit is contained in:
Sofia Boldyreva 2023-12-06 18:41:17 +01:00
parent 3310446910
commit ed02277df9
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@ BuildRequires: systemd-devel
%{?systemd_requires}
Requires(pre): /usr/sbin/useradd
Requires(pre): /usr/bin/getent
Requires(pre): /usr/sbin/groupadd
%if 0%{?rhel} > 7 || 0%{?fedora} > 29
BuildRequires: python3-docutils
@ -156,6 +157,7 @@ getent group openvpn &>/dev/null || groupadd -r openvpn
getent passwd openvpn &>/dev/null || \
/usr/sbin/useradd -r -g openvpn -s /sbin/nologin -c OpenVPN \
-d /etc/openvpn openvpn
exit 0
%post
for srv in `systemctl | awk '/openvpn-client@.*\.service/{print $1} /openvpn-server@.*\.service/{print $1}'`;
@ -203,6 +205,10 @@ done
%changelog
* Wed Dec 6 2023 Elkhan Mammadli <elkhan.mammadli@protonmail.com> - 2.5.9-3
- Added Requires(pre): /usr/sbin/groupadd
- Added exit 0 to the %%pre section
* Thu Sep 7 2023 Elkhan Mammadli <elkhan.mammadli@protonmail.com> - 2.5.9-2
- Added Requires(pre): /usr/bin/getent