aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2014-06-29 12:53:09 +0000
committerImre Kaloz <kaloz@openwrt.org>2014-06-29 12:53:09 +0000
commit8c2b2d609e740947c89f60a87c722c2c2426cd90 (patch)
tree12883f5a668ecf0101668b3635e5a51c06ea213d /target
parent3f4a18063b4bd58616d2b898d80f62a3a67dbde1 (diff)
downloadupstream-8c2b2d609e740947c89f60a87c722c2c2426cd90.tar.gz
upstream-8c2b2d609e740947c89f60a87c722c2c2426cd90.tar.bz2
upstream-8c2b2d609e740947c89f60a87c722c2c2426cd90.zip
[mvebu]: use the power led on the WRT1900AC for status reporting
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41383 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/mvebu/base-files/etc/diag.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/mvebu/base-files/etc/diag.sh b/target/linux/mvebu/base-files/etc/diag.sh
new file mode 100755
index 0000000000..07570b9188
--- /dev/null
+++ b/target/linux/mvebu/base-files/etc/diag.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2014 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/mvebu.sh
+
+get_status_led() {
+ case $(mvebu_board_name) in
+ armada-xp-mamba)
+ status_led="mamba:white:power"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}