SHA256
1
0
forked from pool/openvpn

Accepting request 545137 from network:vpn

OBS-URL: https://build.opensuse.org/request/show/545137
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openvpn?expand=0&rev=79
This commit is contained in:
Dominique Leuenberger 2017-11-25 07:43:50 +00:00 committed by Git OBS Bridge
commit 103813cfba
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 23 13:52:15 UTC 2017 - rbrown@suse.com
- Replace references to /var/adm/fillup-templates with new
%_fillupdir macro (boo#1069468)
-------------------------------------------------------------------
Tue Oct 10 14:10:30 CEST 2017 - ndas@suse.de

View File

@ -16,6 +16,11 @@
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
%if 0%{?suse_version} > 1210
%define with_systemd 1
%else
@ -194,9 +199,9 @@ install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_tmpfilesdir}
install -D -m 755 $RPM_SOURCE_DIR/openvpn.init %{buildroot}/%{_sysconfdir}/init.d/openvpn
ln -sv %{_sysconfdir}/init.d/openvpn %{buildroot}/%{_sbindir}/rcopenvpn
# the /etc/sysconfig/openvpn template only with sysvinit, no needed with systemd
install -d -m0755 %{buildroot}%{_localstatedir}/adm/fillup-templates
install -d -m0755 %{buildroot}%{_fillupdir}
install -m0600 $RPM_SOURCE_DIR/openvpn.sysconfig \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.openvpn
%{buildroot}%{_fillupdir}/sysconfig.openvpn
%endif
cp -p $RPM_SOURCE_DIR/openvpn.README.SUSE README.SUSE
install -m 755 $RPM_SOURCE_DIR/client-netconfig.up sample/sample-scripts/client-netconfig.up
@ -214,7 +219,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf ||:
if test ${FIRST_ARG:-$1} -ge 1 -a \
-x /bin/systemctl -a \
-f %{_sysconfdir}/sysconfig/openvpn -a \
-f %{_localstatedir}/adm/fillup-templates/sysconfig.openvpn && \
-f %{_fillupdir}/sysconfig.openvpn && \
/bin/systemctl --quiet is-enabled openvpn.service &>/dev/null ;
then
. %{_sysconfdir}/sysconfig/openvpn
@ -282,7 +287,7 @@ rm -f %{_sysconfdir}/sysconfig/openvpn || :
%dir %attr(0750,root,root) %ghost %{_rundir}/openvpn/
%else
%config %{_sysconfdir}/init.d/openvpn
%{_localstatedir}/adm/fillup-templates/sysconfig.openvpn
%{_fillupdir}/sysconfig.openvpn
%dir %attr(750,root,root) %{_rundir}/openvpn/
%endif
%{_sbindir}/rcopenvpn