#
# Copyright (C) 2011-2015 OpenWrt.org
#

. /lib/functions/leds.sh
. /lib/functions/uci-defaults.sh

board_config_update

led_dsl="$(get_dt_led dsl)"
[ -n "$led_dsl" ] && {
	led_internet="$(get_dt_led internet)"
	if [ -n "$led_internet" ]; then
		ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
		ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
	else
		ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0"
	fi
}

board=$(board_name)

case "$board" in
allnet,all0333cj)
	ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0.1"
	;;
esac

board_config_flush

exit 0
