[openwrt/openwrt] base-files: add support for heartbeat led trigger
LEDE Commits
lede-commits at lists.infradead.org
Sat Sep 24 09:04:41 PDT 2022
chunkeey pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/1ea34b9621fafa916e0d4ca0b6ec97ac8a611ba9
commit 1ea34b9621fafa916e0d4ca0b6ec97ac8a611ba9
Author: Alexey Smirnov <s.alexey at gmail.com>
AuthorDate: Tue Jan 4 10:11:51 2022 +0300
base-files: add support for heartbeat led trigger
This patch adds support for creation heartbeat led trigger with,
for example, this command:
ucidef_set_led_heartbeat "..." "..." "..."
from /etc/board.d/01_leds.
Signed-off-by: Alexey Smirnov <s.alexey at gmail.com>
(cherry picked from commit 66071729a27919e555752fce25210b1b035eb319)
---
package/base-files/files/lib/functions/uci-defaults.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 02882f43ca..f96e645e73 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -418,6 +418,15 @@ ucidef_set_led_default() {
json_select ..
}
+ucidef_set_led_heartbeat() {
+ _ucidef_set_led_common "$1" "$2" "$3"
+
+ json_add_string trigger heartbeat
+ json_select ..
+
+ json_select ..
+}
+
ucidef_set_led_gpio() {
local gpio="$4"
local inverted="$5"
More information about the lede-commits
mailing list