aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/bin
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-11-26 13:53:06 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-11-26 13:53:06 +0000
commit0e0119b6f0f90461b8924507ae38a3201900c3e3 (patch)
tree211edcac3f697e048eb8f94bea799029fa3fa33f /package/base-files/files/bin
parentaa4c5fd2b0a7c68853970b3b25717fafdf8eb8da (diff)
downloadupstream-0e0119b6f0f90461b8924507ae38a3201900c3e3.tar.gz
upstream-0e0119b6f0f90461b8924507ae38a3201900c3e3.tar.bz2
upstream-0e0119b6f0f90461b8924507ae38a3201900c3e3.zip
base-files: uci-defaults-new, config_generate: support for gpio leds
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47660
Diffstat (limited to 'package/base-files/files/bin')
-rwxr-xr-xpackage/base-files/files/bin/config_generate10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index a0ff53a72c..b6675f12ce 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -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