aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults.sh24
1 files changed, 24 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 a88308bbd0..e39b0a5776 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -390,6 +390,30 @@ ucidef_set_led_usbdev() {
json_select ..
}
+ucidef_set_led_usbport() {
+ local obj="$1"
+ local name="$2"
+ local sysfs="$3"
+ shift
+ shift
+ shift
+
+ json_select_object led
+
+ json_select_object "$obj"
+ json_add_string name "$name"
+ json_add_string type usbport
+ json_add_string sysfs "$sysfs"
+ json_select_array ports
+ for port in "$@"; do
+ json_add_string port "$port"
+ done
+ json_select ..
+ json_select ..
+
+ json_select ..
+}
+
ucidef_set_led_wlan() {
local cfg="led_$1"
local name="$2"