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() {
|
2024-06-19 18:03:29 +00:00
|
|
|
if [ -d "/sys/class/leds/PWR" ]; then
|
|
|
|
status_led="PWR"
|
|
|
|
else
|
|
|
|
status_led="ACT"
|
|
|
|
fi
|
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
|
|
|
|
;;
|
2024-06-19 18:03:29 +00:00
|
|
|
upgrade)
|
|
|
|
status_led_blink_preinit_regular
|
|
|
|
;;
|
2015-02-14 20:48:08 +00:00
|
|
|
done)
|
|
|
|
status_led_on
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|