7b556498d67388eb93ea68fa678b930070c7d06f
[lede.git] / target / linux / pistachio / base-files / etc / diag.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2017 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 . /lib/functions/leds.sh
10 . /lib/pistachio.sh
11
12 status_led="marduk:red:heartbeat"
13
14 set_state() {
15
16         case "$1" in
17         preinit)
18                 status_led_blink_preinit
19                 ;;
20         failsafe)
21                 status_led_blink_failsafe
22                 ;;
23         upgrade | \
24         preinit_regular)
25                 status_led_blink_preinit_regular
26                 ;;
27         done)
28                 status_led_on
29                 ;;
30         esac
31 }