Accepting request 1065524 from network:vpn

OBS-URL: https://build.opensuse.org/request/show/1065524
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openvpn?expand=0&rev=105
This commit is contained in:
Dominique Leuenberger 2023-02-14 19:08:09 +00:00 committed by Git OBS Bridge
commit 8619d43f74
2 changed files with 7 additions and 39 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Feb 13 11:26:45 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
- Remove migration from openvpn.service to openvpn@.service and
depending requires, this is from pre SLE12 times and not supported
anymore.
-------------------------------------------------------------------
Mon Jan 9 13:29:36 UTC 2023 - Reinhard Max <max@suse.com>

View File

@ -16,10 +16,6 @@
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
@ -55,7 +51,6 @@ BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd)
Requires: iproute2
Requires: pkcs11-helper >= 1.11
Requires: sysvinit-tools
%systemd_ordering
%description
@ -182,40 +177,6 @@ find sample -name .gitignore -exec rm -f {} +
%post
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%service_add_post %{name}.target
# try to migrate openvpn.service autostart to openvpn@<CONF>.service
if test $1 -ge 1 -a \
-x /bin/systemctl -a \
-f %{_sysconfdir}/sysconfig/openvpn -a \
-f %{_fillupdir}/sysconfig.openvpn && \
/bin/systemctl --quiet is-enabled openvpn.service >/dev/null 2>/dev/null;
then
. %{_sysconfdir}/sysconfig/openvpn
try_service_cgroup_join()
{
local p="%{_localstatedir}/run/openvpn/${1}.pid"
local t="/sys/fs/cgroup/systemd/system/openvpn@.service/${1}"
/sbin/checkproc -p "$p" "%{_sbindir}/openvpn" >/dev/null 2>/dev/null || return 0
test -d "$t" || mkdir -p "$t" 2>/dev/null || return 1
cat "$p" > "$t/tasks" 2>/dev/null || return 1
}
if test "X$OPENVPN_AUTOSTART" != "X" ; then
for conf in $OPENVPN_AUTOSTART ; do
test -f "%{_sysconfdir}/openvpn/${conf}.conf" && \
/bin/systemctl enable "openvpn@${conf}.service" && \
try_service_cgroup_join "$conf" || continue
done
else
shopt -s nullglob || :
for conf in %{_sysconfdir}/openvpn/*.conf ; do
conf=${conf##*/}
conf=${conf%.conf}
test -f "%{_sysconfdir}/openvpn/${conf}.conf" && \
/bin/systemctl enable "openvpn@${conf}.service" && \
try_service_cgroup_join "$conf" || continue
done
fi
fi
rm -f %{_sysconfdir}/sysconfig/openvpn || :
%preun
%service_del_preun %{name}.target