uci-defaults: add ucidef_set_led_mmc

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 44446
lede-17.01
John Crispin 2015-02-14 20:47:58 +00:00
parent d0cf5a0530
commit eea462106f
1 changed files with 17 additions and 0 deletions

View File

@ -140,6 +140,23 @@ EOF
UCIDEF_LEDS_CHANGED=1 UCIDEF_LEDS_CHANGED=1
} }
ucidef_set_led_mmc() {
local cfg="led_$1"
local name=$2
local sysfs=$3
local trigger=$4
uci -q get system.$cfg && return 0
uci batch <<EOF
set system.$cfg='led'
set system.$cfg.name='$name'
set system.$cfg.sysfs='$sysfs'
set system.$cfg.trigger='$trigger'
EOF
UCIDEF_LEDS_CHANGED=1
}
ucidef_set_rssimon() { ucidef_set_rssimon() {
local dev="$1" local dev="$1"
local refresh="$2" local refresh="$2"