aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorAlberto Bursi <alberto.bursi@outlook.it>2017-03-30 12:27:19 +0200
committerJo-Philipp Wich <jo@mein.io>2017-05-14 21:45:50 +0200
commit4242ddf8f2615749f296b3930799bd47f18d52d8 (patch)
tree162efbeb99b0797220706fc853c6395ab2baf3cb /package/base-files/files/lib
parentb06a286a4861d2a15f0372aabcf643d4b49cd262 (diff)
downloadupstream-4242ddf8f2615749f296b3930799bd47f18d52d8.tar.gz
upstream-4242ddf8f2615749f296b3930799bd47f18d52d8.tar.bz2
upstream-4242ddf8f2615749f296b3930799bd47f18d52d8.zip
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>
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 07e42c6491..6578202269 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -358,6 +358,10 @@ ucidef_add_vdsl_modem() {
json_select ..
}
+ucidef_set_led_ataport() {
+ _ucidef_set_led_trigger "$1" "$2" "$3" ata"$4"
+}
+
_ucidef_set_led_common() {
local cfg="led_$1"
local name="$2"
@@ -510,6 +514,10 @@ ucidef_set_led_usbdev() {
json_select ..
}
+ucidef_set_led_usbhost() {
+ _ucidef_set_led_trigger "$1" "$2" "$3" usb-host
+}
+
ucidef_set_led_usbport() {
local obj="$1"
local name="$2"