2015-02-14 20:48:08 +00:00
|
|
|
#!/bin/sh
|
2016-03-08 18:11:55 +00:00
|
|
|
# Copyright (C) 2015-2016 OpenWrt.org
|
2017-03-05 20:16:06 +00:00
|
|
|
# Copyright (C) 2017 LEDE project
|
2015-02-14 20:48:08 +00:00
|
|
|
|
|
|
|
. /lib/functions/leds.sh
|
2015-11-22 08:04:37 +00:00
|
|
|
. /lib/brcm2708.sh
|
2015-02-14 20:48:08 +00:00
|
|
|
|
|
|
|
set_state() {
|
2015-11-22 08:04:37 +00:00
|
|
|
case "$(brcm2708_board_name)" in
|
2017-03-05 20:16:06 +00:00
|
|
|
rpi-2-b |\
|
|
|
|
rpi-b-plus)
|
|
|
|
status_led="led1"
|
|
|
|
;;
|
2015-11-22 08:04:37 +00:00
|
|
|
rpi-b |\
|
2016-06-21 15:49:43 +00:00
|
|
|
rpi-cm |\
|
2017-03-05 20:16:07 +00:00
|
|
|
rpi-zero |\
|
|
|
|
rpi-zero-w)
|
2015-11-22 08:04:37 +00:00
|
|
|
status_led="led0"
|
|
|
|
;;
|
|
|
|
esac
|
2015-02-14 20:48:08 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
|
|
|
status_led_blink_preinit
|
|
|
|
;;
|
|
|
|
failsafe)
|
|
|
|
status_led_blink_failsafe
|
|
|
|
;;
|
|
|
|
preinit_regular)
|
|
|
|
status_led_blink_preinit_regular
|
|
|
|
;;
|
|
|
|
done)
|
|
|
|
status_led_on
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|