
MODE=`uci get slideswitch.mode.m`

if [ "$MODE" = "bridge" ]; then
	echo "Force DHCP Server Mode triggered" > /dev/console

	# Enable the LAN port (eth0.1)
	/sbin/ifconfig eth0.1 up

	# Disable the WAN port (eth0.2)
	/sbin/ifconfig eth0.2 down

	# Configure and start the temporary DHCP server
	/etc/init.d/dnsmasq stop
	/usr/sbin/dnsmasq -C /etc/force_dhcp.conf

	# Set IP for the LAN
	/sbin/ifconfig br-lan 192.168.1.210

	# Cut off 2.4G wireless driver LED control
	iwpriv wifi0 wifi_led 0

	# Turn on the 2.4GHz LED to RED blink
	ledctl -l 2 -a 1 -p 1
fi
