1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00

base-files: LED/trigger/heartbeat: Add support for inversion

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>
This commit is contained in:
Olliver Schinagl 2022-07-31 10:11:58 +02:00 committed by Hauke Mehrtens
parent b8f27251c9
commit 404cad6470

@ -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