aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2010-04-16 11:09:19 +0800
committerkuriyama <kuriyama@FreeBSD.org>2010-04-16 11:09:19 +0800
commit909becfc9210472955d15202224e6170ae708368 (patch)
tree7e37a477d309d3b7949e90f9c1bf5fffae9dbcca /net
parentef670b56ed704c06ae0e5b1edde835bdc0cbc3b5 (diff)
downloadfreebsd-ports-gnome-909becfc9210472955d15202224e6170ae708368.tar.gz
freebsd-ports-gnome-909becfc9210472955d15202224e6170ae708368.tar.zst
freebsd-ports-gnome-909becfc9210472955d15202224e6170ae708368.zip
- Take maintainership.
- Support multiple vtunclient startup from rc.subr.
Diffstat (limited to 'net')
-rw-r--r--net/vtun/Makefile4
-rw-r--r--net/vtun/files/vtunclient.in30
2 files changed, 31 insertions, 3 deletions
diff --git a/net/vtun/Makefile b/net/vtun/Makefile
index ebc4a3d52771..e44c31a63f0d 100644
--- a/net/vtun/Makefile
+++ b/net/vtun/Makefile
@@ -7,11 +7,11 @@
PORTNAME= vtun
PORTVERSION= 3.0.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= SF
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= kuriyama@FreeBSD.org
COMMENT= Virtual Tunnels over TCP/IP networks with traffic shaping
LIB_DEPENDS= lzo2.2:${PORTSDIR}/archivers/lzo2
diff --git a/net/vtun/files/vtunclient.in b/net/vtun/files/vtunclient.in
index fa25547911da..c680277194a8 100644
--- a/net/vtun/files/vtunclient.in
+++ b/net/vtun/files/vtunclient.in
@@ -10,6 +10,18 @@
# vtunclient_enable="YES"
# vtunclient_flags="<session> <server address>"
#
+# If you want to use multiple connections, use $vtunclient_list.
+# Usual $vtunclient_flags will be ignored when $vtunclient_list is
+# set.
+#
+# vtunclient_enable="YES"
+# vtunclient_list="site1 site2"
+# vtunclient_site1_flags="<session> <server address>"
+# vtunclient_site1_pidfile="/var/run/vtun-site1.pid"
+# vtunclient_site2_flags="<session> <server address>"
+# vtunclient_site2_pidfile="/var/run/vtun-site2.pid"
+# ...
+#
vtunclient_enable=${vtunclient_enable:-"NO"}
@@ -22,4 +34,20 @@ required_files="%%PREFIX%%/etc/vtund.conf"
command=%%PREFIX%%/sbin/vtund
load_rc_config $name
-run_rc_command "$1"
+cmd="$1"
+if [ $# -gt 0 ]; then
+ shift
+fi
+if [ -n "$*" ]; then
+ vtunclient_list="$*"
+fi
+
+if [ -z "$vtunclient_list" ]; then
+ run_rc_command "$cmd"
+else
+ for _client in ${vtunclient_list}; do
+ eval vtunclient_flags=\$vtunclient_${_client}_flags
+ eval pidfile=\$vtunclient_${_client}_pidfile
+ run_rc_command "$cmd"
+ done
+fi