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
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
|
. /lib/functions.sh
|
2015-02-14 20:48:08 +00:00
|
|
|
|
. /lib/functions/leds.sh
|
|
|
|
|
|
|
|
|
|
set_state() {
|
2017-05-12 20:36:07 +00:00
|
|
|
|
case "$(board_name)" in
|
2017-12-17 14:18:48 +00:00
|
|
|
|
raspberrypi,2-model-b |\
|
2021-02-19 06:58:36 +00:00
|
|
|
|
raspberrypi,2-model-b-rev2 |\
|
|
|
|
|
raspberrypi,3-model-b |\
|
|
|
|
|
raspberrypi,3-model-b-plus |\
|
|
|
|
|
raspberrypi,400 |\
|
|
|
|
|
raspberrypi,4-compute-module |\
|
|
|
|
|
raspberrypi,4-model-b |\
|
2017-12-17 14:18:48 +00:00
|
|
|
|
raspberrypi,model-b-plus)
|
2017-03-05 20:16:06 +00:00
|
|
|
|
status_led="led1"
|
|
|
|
|
;;
|
2021-02-19 06:58:36 +00:00
|
|
|
|
raspberrypi,3-compute-module |\
|
2017-12-17 14:18:48 +00:00
|
|
|
|
raspberrypi,model-b |\
|
|
|
|
|
raspberrypi,model-zero |\
|
|
|
|
|
raspberrypi,model-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
|
|
|
|
|
}
|