From 1552fd49b45ce917123680665ea186f5b226f36b Mon Sep 17 00:00:00 2001 From: cyrus Date: Sun, 15 Dec 2013 19:38:53 +0000 Subject: Convert DHCP->6rd and DHCPv6->DS-Lite autoconfig to dynamic interface git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39061 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/network/ipv6/odhcp6c/files/dhcpv6.script | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'package/network/ipv6/odhcp6c/files') 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 -- cgit v1.2.3