aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pistachio/base-files/etc/diag.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/pistachio/base-files/etc/diag.sh')
-rwxr-xr-xtarget/linux/pistachio/base-files/etc/diag.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/pistachio/base-files/etc/diag.sh b/target/linux/pistachio/base-files/etc/diag.sh
new file mode 100755
index 0000000000..7b556498d6
--- /dev/null
+++ b/target/linux/pistachio/base-files/etc/diag.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+. /lib/functions/leds.sh
+. /lib/pistachio.sh
+
+status_led="marduk:red:heartbeat"
+
+set_state() {
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ upgrade | \
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}