summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/base-files/etc/uci-defaults/01_leds')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/uci-defaults/01_leds28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
new file mode 100755
index 0000000..3f87fe0
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Copyright (C) 2011 OpenWrt.org
+# based on ar71xx
+#
+
+. /lib/functions/uci-defaults.sh
+. /lib/functions/lantiq.sh
+
+[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt"
+[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1"
+[ -e "/sys/class/leds/dsl" ] && ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan"
+
+for a in `ls /sys/class/leds/`; do
+ grep -q "\[none\]" /sys/class/leds/$a/trigger
+ [ $? -eq 0 ] && ucidef_set_led_default $a $a $a `cat /sys/class/leds/$a/brightness`
+done
+
+board=$(lantiq_board_id)
+
+case "$board" in
+*)
+ ;;
+esac
+
+ucidef_commit_leds
+
+exit 0