projects
/
openwrt
/
staging
/
rmilecki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f2725
)
base-files: LED/trigger/heartbeat: Add support for inversion
author
Olliver Schinagl
<oliver@schinagl.nl>
Sun, 31 Jul 2022 08:11:58 +0000
(10:11 +0200)
committer
Hauke Mehrtens
<hauke@hauke-m.de>
Sat, 6 Aug 2022 17:58:46 +0000
(19:58 +0200)
The heartbeat trigger has the option to be inverted, however
openwrt/uci/luci have no way to set this.
This patch adds this support.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
package/base-files/files/etc/init.d/led
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/init.d/led
b/package/base-files/files/etc/init.d/led
index 732ac59a84f0648f966f81373a9b9ce31e1b5842..08a1e6df3bbaf697c1eaaaea8e2501af77f4f901 100755
(executable)
--- a/
package/base-files/files/etc/init.d/led
+++ b/
package/base-files/files/etc/init.d/led
@@
-69,6
+69,10
@@
load_led() {
return 1
}
case "$trigger" in
+ "heartbeat")
+ echo "${inverted}" > "/sys/class/leds/${sysfs}/invert"
+ ;;
+
"netdev")
[ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name