aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/base-files/etc
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
commitd59f68531bc30304aba7e3ee2f45827af77ba100 (patch)
tree16ebe43b5c990817b56af981ff2534f5473b94e1 /target/linux/mvebu/base-files/etc
parent2c06f052368896e92105dfdb42251ac1f5685d97 (diff)
downloadupstream-d59f68531bc30304aba7e3ee2f45827af77ba100.tar.gz
upstream-d59f68531bc30304aba7e3ee2f45827af77ba100.tar.bz2
upstream-d59f68531bc30304aba7e3ee2f45827af77ba100.zip
use the power led on the WRT1900AC for status reporting
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 41383
Diffstat (limited to 'target/linux/mvebu/base-files/etc')
-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
+}