2
0
forked from Ivasoft/openwrt

base-files: uci-defaults-new, config_generate: support for gpio leds

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47660
This commit is contained in:
Jo-Philipp Wich
2015-11-26 13:53:06 +00:00
parent aa4c5fd2b0
commit 0e0119b6f0
2 changed files with 31 additions and 0 deletions

View File

@@ -305,6 +305,16 @@ generate_led() {
EOF
case "$type" in
gpio)
local gpio inverted
json_get_vars gpio inverted
uci -q batch <<-EOF
set system.$cfg.trigger='gpio'
set system.$cfg.gpio='$gpio'
set system.$cfg.inverted='$inverted'
EOF
;;
netdev)
local device
json_get_vars device