aboutsummaryrefslogtreecommitdiff
path: root/net/vtun
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2010-04-16 03:09:19 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2010-04-16 03:09:19 +0000
commit6ca7147fa3958807195d55d1c756d988f864e7fc (patch)
tree0c42c073d039c6e048cf3ec446ecfc9dc31a37ef /net/vtun
parent5f2a95354bdc674a48ed3074fad653022c810db7 (diff)
downloadports-6ca7147fa3958807195d55d1c756d988f864e7fc.tar.gz
ports-6ca7147fa3958807195d55d1c756d988f864e7fc.zip
Notes
Diffstat (limited to 'net/vtun')
-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