From da2b12d9c60482bda7c18e359cc467f782aa0f2f5746ddb9f419472e2d04b269 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 4 Mar 2019 09:06:34 +0000 Subject: [PATCH] Accepting request 678070 from home:fbui:branches:network:vpn - Drop use of $FIRST_ARG in openvpn.spec The use of $FIRST_ARG was probably required because of the %service_* rpm macros were playing tricks with the shell positional parameters. This is bad practice and error prones so let's assume that no macros should do that anymore and hence it's safe to assume that positional parameters remains unchanged after any rpm macro call. OBS-URL: https://build.opensuse.org/request/show/678070 OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=139 --- openvpn.changes | 12 ++++++++++++ openvpn.spec | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/openvpn.changes b/openvpn.changes index 0cd1967..8466940 100644 --- a/openvpn.changes +++ b/openvpn.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Feb 21 18:26:42 UTC 2019 - Franck Bui + +- Drop use of $FIRST_ARG in openvpn.spec + + The use of $FIRST_ARG was probably required because of the + %service_* rpm macros were playing tricks with the shell positional + parameters. This is bad practice and error prones so let's assume + that no macros should do that anymore and hence it's safe to assume + that positional parameters remains unchanged after any rpm macro + call. + ------------------------------------------------------------------- Wed Feb 20 21:22:25 UTC 2019 - Michael Ströder diff --git a/openvpn.spec b/openvpn.spec index bd14041..bd2a6e2 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -1,7 +1,7 @@ # # spec file for package openvpn # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -216,7 +216,7 @@ find sample -name .gitignore | xargs rm -f %tmpfiles_create %{_tmpfilesdir}/%{name}.conf %service_add_post %{name}.target # try to migrate openvpn.service autostart to openvpn@.service -if test ${FIRST_ARG:-$1} -ge 1 -a \ +if test $1 -ge 1 -a \ -x /bin/systemctl -a \ -f %{_sysconfdir}/sysconfig/openvpn -a \ -f %{_fillupdir}/sysconfig.openvpn && \