From: Olliver Schinagl Date: Sun, 31 Jul 2022 08:11:58 +0000 (+0200) Subject: base-files: LED/trigger/heartbeat: Add support for inversion X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=404cad64709fbe3794f9116fb7c35708027d2ac8;p=openwrt%2Fstaging%2Fstintel.git 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 --- diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 732ac59a84..08a1e6df3b 100755 --- 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