#!/bin/sh

echo "uci settings"

uci -q batch <<-EOF
	del dhcp.lan.ra
	del dhcp.lan.dhcpv6
	del dhcp.lan.ra_flags
	add_list dhcp.lan.ra_flags=none

	set network.wan.ipv6='0'
	del dhcp.wan.ra_flags
	add_list dhcp.wan.ra_flags=none

	set network.wan6.auto=0

	set dhcp.@dnsmasq[0].filter_aaaa='1'

	commit network
	commit dhcp
EOF

echo "reload_config"
reload_config
echo -n "wait for device online"
for i in `seq 10 -1 1`; do
	echo -n "."
	sleep 1
done
echo ""
echo "done"
