Modified the way tunneldigger hosts are configured in UCI.

This commit is contained in:
Jernej Kos 2012-08-19 18:36:06 +02:00
parent 959b0be24a
commit 8e423b5efd
3 changed files with 7 additions and 9 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tunneldigger PKG_NAME:=tunneldigger
PKG_VERSION:=0.2 PKG_VERSION:=0.2
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_REV:=HEAD PKG_REV:=HEAD
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2

View File

@ -1,8 +1,7 @@
config broker config broker
option address 'x.y.z.w' list address 'x.y.z.w:8942'
list port 8942 list address 'x.y.z.w:53'
list port 53 list address 'x.y.z.w:123'
list port 123
option uuid 'abcd' option uuid 'abcd'
option interface 'l2tp0' option interface 'l2tp0'

View File

@ -9,14 +9,13 @@ config_cb() {
case "$configname" in case "$configname" in
broker) broker)
config_get address "$cfg" address config_get addresses "$cfg" address
config_get ports "$cfg" port
config_get uuid "$cfg" uuid config_get uuid "$cfg" uuid
config_get interface "$cfg" interface config_get interface "$cfg" interface
local broker_opts="" local broker_opts=""
for port in $ports; do for address in $addresses; do
broker_opts="${broker_opts} -b ${address}:${port}" broker_opts="${broker_opts} -b ${address}"
done done
/usr/bin/tunneldigger -u ${uuid} -i ${interface} -t ${tunnel_id} ${broker_opts} & /usr/bin/tunneldigger -u ${uuid} -i ${interface} -t ${tunnel_id} ${broker_opts} &