#!/bin/sh

if [ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "0" ]; then
	uci -q batch <<-EOF >/dev/null
		delete dhcp.lan.ra_default
		delete dhcp.lan.dhcpv6
		delete dhcp.lan.ra
		set dhcp.lan.force=1
		commit dhcp
	EOF
	rm -f /tmp/luci-indexcache
fi

exit 0
