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 |\
|
|
|
|
raspberrypi,model-b-plus)
|
2017-03-05 20:16:06 +00:00
|
|
|
status_led="led1"
|
|
|
|
;;
|
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
|
|
|
|
}
|