diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-26 14:49:17 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-26 14:49:17 +0000 |
commit | eced3b3a355199e1a1b51cba41689d9336d95c40 (patch) | |
tree | 84c0da0193f4b0a9b1c646eebb59596528d441cf /package/base-files/files/lib/functions | |
parent | 578e8d6c588d7bf3875e395548d6f78a1e71208a (diff) | |
download | master-31e0f0ae-eced3b3a355199e1a1b51cba41689d9336d95c40.tar.gz master-31e0f0ae-eced3b3a355199e1a1b51cba41689d9336d95c40.tar.bz2 master-31e0f0ae-eced3b3a355199e1a1b51cba41689d9336d95c40.zip |
base-files: support passing mode to ucidef_set_led_netdev()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 48806
Diffstat (limited to 'package/base-files/files/lib/functions')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults.sh | 2 |
1 files changed, 2 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 d556844e95..512e0ed8bd 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -355,6 +355,7 @@ ucidef_set_led_netdev() { local name="$2" local sysfs="$3" local dev="$4" + local mode="${5:-link tx rx}" json_select_object led @@ -363,6 +364,7 @@ ucidef_set_led_netdev() { json_add_string type netdev json_add_string sysfs "$sysfs" json_add_string device "$dev" + json_add_string mode "$mode" json_select .. json_select .. |