base-files: add led functions to uci-defaults.sh
uci_set_leds_ataport() allows to set a led to show activity on a specific (s)ata port, which is needed for devices that have a Sata led for each sata port. The led trigger is from the 834-ledtrig-libata.patch LEDE kernel patch. uci_set_leds_usbhost() allows to set a led to show total usb activity. Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it> [Jo-Philipp Wich: use a single underscore to denote private functions] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
b06a286a48
commit
4242ddf8f2
1 changed files with 8 additions and 0 deletions
|
@ -358,6 +358,10 @@ ucidef_add_vdsl_modem() {
|
||||||
json_select ..
|
json_select ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ucidef_set_led_ataport() {
|
||||||
|
_ucidef_set_led_trigger "$1" "$2" "$3" ata"$4"
|
||||||
|
}
|
||||||
|
|
||||||
_ucidef_set_led_common() {
|
_ucidef_set_led_common() {
|
||||||
local cfg="led_$1"
|
local cfg="led_$1"
|
||||||
local name="$2"
|
local name="$2"
|
||||||
|
@ -510,6 +514,10 @@ ucidef_set_led_usbdev() {
|
||||||
json_select ..
|
json_select ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ucidef_set_led_usbhost() {
|
||||||
|
_ucidef_set_led_trigger "$1" "$2" "$3" usb-host
|
||||||
|
}
|
||||||
|
|
||||||
ucidef_set_led_usbport() {
|
ucidef_set_led_usbport() {
|
||||||
local obj="$1"
|
local obj="$1"
|
||||||
local name="$2"
|
local name="$2"
|
||||||
|
|
Loading…
Reference in a new issue