Date: Mon, 30 Mar 2020 19:15:33 +0000 (UTC) From: Bernhard Froehlich <decke@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r529908 - in head/net/wireguard: . files Message-ID: <202003301915.02UJFXXK038057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: decke Date: Mon Mar 30 19:15:32 2020 New Revision: 529908 URL: https://svnweb.freebsd.org/changeset/ports/529908 Log: net/wireguard: Introduce general wireguard_env parameter for environment variables which affect wg-quick or the userspace implementation (eg. wireguard-go). The syntax in rc.conf is: wireguard_env="VAR=val VAR2=val2" As a reference wg-quick uses these environment variables WG_QUICK_USERSPACE_IMPLEMENTATION and wireguard-go LOG_LEVEL WG_TUN_FD WG_UAPI_FD WG_PROCESS_FOREGROUND Submitted by: J.R. Oldroyd <fbsd@opal.com> Modified: head/net/wireguard/Makefile head/net/wireguard/files/wireguard.in Modified: head/net/wireguard/Makefile ============================================================================== --- head/net/wireguard/Makefile Mon Mar 30 19:15:20 2020 (r529907) +++ head/net/wireguard/Makefile Mon Mar 30 19:15:32 2020 (r529908) @@ -2,6 +2,7 @@ PORTNAME= wireguard PORTVERSION= 1.0.20200319 +PORTREVISION= 1 CATEGORIES= net net-vpn MASTER_SITES= https://git.zx2c4.com/wireguard-tools/snapshot/ DISTNAME= wireguard-tools-${PORTVERSION} Modified: head/net/wireguard/files/wireguard.in ============================================================================== --- head/net/wireguard/files/wireguard.in Mon Mar 30 19:15:20 2020 (r529907) +++ head/net/wireguard/files/wireguard.in Mon Mar 30 19:15:32 2020 (r529908) @@ -12,10 +12,8 @@ # wireguard_interfaces (str): List of interfaces to bring up/down # on start/stop. (eg: "wg0 wg1") # (default: "") -# wireguard_impl (str): Wireguard userspace implementation -# (default: "wireguard-go") -# Possible choices: -# wireguard-go, boringtun +# wireguard_env (str): Environment variables for the userspace +# implementation. (eg: "LOG_LEVEL=debug") . /etc/rc.subr @@ -27,7 +25,7 @@ stop_cmd="${name}_stop" wireguard_start() { - export WG_QUICK_USERSPACE_IMPLEMENTATION=${wireguard_impl} + ${wireguard_env:+eval export $wireguard_env} for interface in ${wireguard_interfaces}; do %%PREFIX%%/bin/wg-quick up ${interface} @@ -45,6 +43,6 @@ load_rc_config $name : ${wireguard_enable="NO"} : ${wireguard_interfaces=""} -: ${wireguard_impl="wireguard-go"} +: ${wireguard_env=""} run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003301915.02UJFXXK038057>