git: 29d16aeb4442 - main - security/openvpn: support ${name}_FLAGS

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 20:15:49 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29d16aeb4442994cf93d26084e4b79ff55d3feba

commit 29d16aeb4442994cf93d26084e4b79ff55d3feba
Author:     0x1eef <0x1eef@protonmail.com>
AuthorDate: 2022-10-03 20:14:30 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-10-03 20:15:41 +0000

    security/openvpn: support ${name}_FLAGS
    
    and bump PORTREVISION.
    
    PR:             266796
---
 security/openvpn/Makefile         | 2 +-
 security/openvpn/files/openvpn.in | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile
index b087a8db3b8c..fa3f70c8645c 100644
--- a/security/openvpn/Makefile
+++ b/security/openvpn/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=		openvpn
 DISTVERSION=		2.5.7
-PORTREVISION?=		1
+PORTREVISION?=		2
 CATEGORIES=		security net net-vpn
 MASTER_SITES=		https://swupdate.openvpn.org/community/releases/ \
 			https://build.openvpn.net/downloads/releases/ \
diff --git a/security/openvpn/files/openvpn.in b/security/openvpn/files/openvpn.in
index bd544744bb4d..c6440b0d2140 100644
--- a/security/openvpn/files/openvpn.in
+++ b/security/openvpn/files/openvpn.in
@@ -130,6 +130,7 @@ eval ": \${${name}_dir:=\"%%PREFIX%%/etc/openvpn\"}"
 configfile="$(eval echo \${${name}_configfile})"
 dir="$(eval echo \${${name}_dir})"
 interfaces="$(eval echo \${${name}_if})"
+flags="$(eval echo \${$name}_flags})"
 
 required_modules=
 for i in $interfaces ; do
@@ -138,6 +139,6 @@ done
 
 required_files=${configfile}
 
-command_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile}"
+command_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile} ${flags}"
 
 run_rc_command "$1"