summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-01-18 12:42:53 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-01-18 12:42:53 +0000
commit3a2cccda2eb45c6b55ef33c73a4af2c88935f383 (patch)
tree42f8f7a8c928a04176ec598da4684b0d778e216d /target/linux/lantiq/base-files/etc/uci-defaults/01_leds
parent0de21d9747688e37cc9a9fb92c41abcdde9ef09f (diff)
downloadmtk-20170518-3a2cccda2eb45c6b55ef33c73a4af2c88935f383.zip
mtk-20170518-3a2cccda2eb45c6b55ef33c73a4af2c88935f383.tar.gz
mtk-20170518-3a2cccda2eb45c6b55ef33c73a4af2c88935f383.tar.bz2
all targets: use numerically prefixed uci-defaults file names to better control order of execution
SVN-Revision: 35217
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