mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
busybox: add ledfix script/service
This commit is contained in:
23
packages/sysutils/busybox/scripts/ledfix
Executable file
23
packages/sysutils/busybox/scripts/ledfix
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# find heartbeat triggers and set them to none
|
||||
case $(dtsoc) in
|
||||
amlogic*)
|
||||
for triggerfile in $(find /sys/devices/platform/leds -name trigger); do
|
||||
trigger=$(awk -F'[][]' '{print $2}' "$triggerfile")
|
||||
if [ "$trigger" = "heartbeat" ]; then
|
||||
echo "none" > "$triggerfile"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
# add device-specific led handling here
|
||||
case $(dtname) in
|
||||
khadas,vim3*)
|
||||
echo "255" > /sys/devices/platform/leds/leds/vim3\:red/brightness
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user