aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mpc85xx/base-files/etc/diag.sh
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-21 19:20:34 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-02-21 19:20:34 +0000
commit4da13625d5e60842dac6ca274bc95258b4d2f2e2 (patch)
tree85679e14b8ae95001bc1361cfca86d74b9fdc06e /target/linux/mpc85xx/base-files/etc/diag.sh
parentbd2c77b264c39861a1e03c8a0d8b14787ef4cf68 (diff)
downloadupstream-4da13625d5e60842dac6ca274bc95258b4d2f2e2.tar.gz
upstream-4da13625d5e60842dac6ca274bc95258b4d2f2e2.tar.bz2
upstream-4da13625d5e60842dac6ca274bc95258b4d2f2e2.zip
mpc85xx: add user-space support for the TL-WDR4900 v1
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35733
Diffstat (limited to 'target/linux/mpc85xx/base-files/etc/diag.sh')
-rwxr-xr-xtarget/linux/mpc85xx/base-files/etc/diag.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh
new file mode 100755
index 0000000000..bb7f668c08
--- /dev/null
+++ b/target/linux/mpc85xx/base-files/etc/diag.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (C) 2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/mpc85xx.sh
+
+get_status_led() {
+ case $(mpc85xx_board_name) in
+ tl-wdr4900-v1)
+ status_led="tp-link:blue:system"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ insmod leds-gpio
+ insmod ledtrig-default-on
+ insmod ledtrig-timer
+
+ status_led_blink_preinit
+ ;;
+
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+
+ done)
+ status_led_on
+ ;;
+ esac
+}