From nobody Sat Oct 22 04:52:14 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MvTTW2f1Pz4fZLg; Sat, 22 Oct 2022 04:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MvTTW0zmNz44vW; Sat, 22 Oct 2022 04:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666414335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ur54kpa54Kw/ghOSlBCdk08WSylhMSuFIPz1GoHOCk=; b=VFQSE+ohII8l2TTpCk+BTyZhPKlOhMlwzhuN/L3MKf32+0byoK3rBbrJ4b3MdfYQrx3uvi 5fHgKxy4VGUBb6gLaTYgvz1SWtVf3N4UIvaWV6xPTp4iS4+31KDvxmfczLf8tO5JZX9mjD 3jko6N59e56IQuaKCsI28VtStrmhU9kJUaKpc/LqJEpqF6xyE5ma5OiUButYfYY4KfbC5/ Gmsu0bwmlajD5k7/hjMnWpBt1jSYjYEDiv0KGlegMtBGwicMh2Hu+H89oxkJRGtrpPV4J0 SDiJrO/xdf2UgnHDxLGtK2nll7JYbB3fyI/+f7RAnikBsH1i78nNla5k5KldDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MvTTW04kQzRjQ; Sat, 22 Oct 2022 04:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29M4qEqi012082; Sat, 22 Oct 2022 04:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29M4qEa1012081; Sat, 22 Oct 2022 04:52:14 GMT (envelope-from git) Date: Sat, 22 Oct 2022 04:52:14 GMT Message-Id: <202210220452.29M4qEa1012081@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ashish SHUKLA Subject: git: 1e38c92fd199 - main - security/tailscale: Add suupport for extra arguments List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ashish X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e38c92fd199d83be41d4a15b894a45e552cf1be Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666414335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ur54kpa54Kw/ghOSlBCdk08WSylhMSuFIPz1GoHOCk=; b=yvCq/ETGBuCCJuZJHC+0dttAexKSyCAj1CeUdrxokd58KKI3HdZqHLMAnFVyLkw3vT6XvQ ef3WRAKXELAO2PpfygY26lsKlus/VhbsWVPzXIu0Q5/GVAEoAQpnzZ9LYVAOLTrIqsy1yB 8xieDjEFrAq4JJX/jz4q8LVfczx2xkSSKJW4p81U8OKTMUW2ziQ3dY55mmN062SbnlR4jB zIEEESWqSlB77+FNsrSidPkjwl/1Kk+plXMVcW9d6n0GDSIcFVxoDn6VveAmkoN8QX1eFj oQ0g/e0d6QzyC8kg5UO/7DboFamu+YbYhw+chP1dMR6GgoU4047uYuuJjh7T8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666414335; a=rsa-sha256; cv=none; b=Ul5k8HIfer5pM7CWkWAEzyTTHpyI8SH+avU/OMJSOjOrLpGwQhLkRI5x7c1oVrm7AQ/i+6 tD17uobjLcFQ8NmjtaUgwRjy0osPUP0fXLM1IQMLVqRz8WVwScRsK+/vKLyCLvaPB08jKc nNvaN53kW1+yRmP3XEuqbFPLpyts9bwgFURKgY2/bjvMLEqSyFbRJOnpKSPq52Hk18Lkqz oVQJauWMWkrLgfZa6//WbvvJ+KhqXCIOVZHHSU66FTVq4G0Kkrlm+W6iawxGe2nJw/2xZj KnfCUY+gbBofDm3KegtGQGg58PsoSU6SKizIlNoGFj2VW9gjJprgAPjj6NtUtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ashish: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e38c92fd199d83be41d4a15b894a45e552cf1be commit 1e38c92fd199d83be41d4a15b894a45e552cf1be Author: Ashish SHUKLA AuthorDate: 2022-10-21 16:12:08 +0000 Commit: Ashish SHUKLA CommitDate: 2022-10-22 04:50:12 +0000 security/tailscale: Add suupport for extra arguments Add a rc.conf variable to support passing extra arguments to tailscale up. Thanks to Gregory for advicing on the implementation. Reported by: Gregory Shapiro --- security/tailscale/Makefile | 1 + security/tailscale/files/tailscaled.in | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/security/tailscale/Makefile b/security/tailscale/Makefile index 390cb5f50d63..e041a8b7991a 100644 --- a/security/tailscale/Makefile +++ b/security/tailscale/Makefile @@ -1,5 +1,6 @@ PORTNAME= tailscale PORTVERSION= 1.32.0 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= security net-vpn diff --git a/security/tailscale/files/tailscaled.in b/security/tailscale/files/tailscaled.in index f70c8cd71873..cfa72604f5e3 100644 --- a/security/tailscale/files/tailscaled.in +++ b/security/tailscale/files/tailscaled.in @@ -19,6 +19,8 @@ # Default is "daemon". See daemon(8). # tailscaled_exitnode_enable (bool): Set it to YES to announce tailscaled as # an exit node. Default is "NO". +# tailscaled_up_args (str): Additional arguments to pass to tailscale up +# Default is "" (empty string). # tailscaled_tun_dev (str): Set the name of the tun interface tailscaled creates. # Default is "tailscale0" @@ -32,6 +34,7 @@ load_rc_config $name : ${tailscaled_enable:="NO"} : ${tailscaled_port:="41641"} : ${tailscaled_exitnode_enable:="NO"} +: ${tailscaled_up_args:=""} : ${tailscaled_tun_dev:="tailscale0"} DAEMON=$(/usr/sbin/daemon 2>&1 | grep -q syslog ; echo $?) @@ -78,7 +81,10 @@ tailscaled_poststart() { if checkyesno tailscaled_exitnode_enable; then logger -s -t tailscale "Enabling Exit node mode" - ${ctlname} up --advertise-exit-node + tailscaled_up_args=" --advertise-exit-node ${tailscaled_up_args}" + fi + if [ -n "${tailscaled_up_args}" ]; then + ${ctlname} up ${tailscaled_up_args} fi }