aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/odhcp6c/files
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2013-12-15 19:38:53 +0000
committerSteven Barth <cyrus@openwrt.org>2013-12-15 19:38:53 +0000
commite49d67f1925f1582138c7fcd998c6952aa5d0909 (patch)
treeed1d9b1c2f89b77edc9426e58d3d6d535ce56de1 /package/network/ipv6/odhcp6c/files
parent36197755dc955f1ff287270d58a607ce975cbce4 (diff)
downloadupstream-e49d67f1925f1582138c7fcd998c6952aa5d0909.tar.gz
upstream-e49d67f1925f1582138c7fcd998c6952aa5d0909.tar.bz2
upstream-e49d67f1925f1582138c7fcd998c6952aa5d0909.zip
Convert DHCP->6rd and DHCPv6->DS-Lite autoconfig to dynamic interface
SVN-Revision: 39061
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script19
1 files changed, 8 insertions, 11 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index 1d5f521e45..8bcf76681c 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -78,17 +78,14 @@ setup_interface () {
proto_send_update "$INTERFACE"
if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
-uci -q batch <<-EOF >/dev/null
-set network.$IFACE_DSLITE.proto=dslite
-set network.$IFACE_DSLITE.auto=0
-set network.$IFACE_DSLITE.peeraddr=$AFTR_IP
-set network.$IFACE_DSLITE.tunlink=$INTERFACE
-commit network
-EOF
-
- ifdown "$IFACE_DSLITE"
- /etc/init.d/network reload
- ifup "$IFACE_DSLITE"
+ json_init
+ json_add_string name "$IFACE_DSLITE"
+ json_add_string ifname "@$INTERFACE"
+ json_add_string proto "dslite"
+ json_add_string peeraddr "$AFTR_IP"
+ json_add_string tunlink "$INTERFACE"
+ json_close_object
+ ubus call network add_dynamic "$(json_dump)"
fi
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN