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
commit17eba854404e31e92020821d5305b09b3c03c93b (patch)
tree746d92294129de0d98150a5fb66871d0bb7f65bd /target/linux/mpc85xx/base-files/etc/diag.sh
parent70d3a2f6404e2cda9fe05d654dd81b7101c75de6 (diff)
downloadupstream-17eba854404e31e92020821d5305b09b3c03c93b.tar.gz
upstream-17eba854404e31e92020821d5305b09b3c03c93b.tar.bz2
upstream-17eba854404e31e92020821d5305b09b3c03c93b.zip
mpc85xx: add user-space support for the TL-WDR4900 v1
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35733 3c298f89-4303-0410-b956-a3cf2f4a3e73
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
+}