mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 05:38:00 +00:00
base-files: Add ucidef_set_led_timer to uci-defaults.sh
Signed-off-by: Gerald Kerma <dreagle@doukki.net> SVN-Revision: 44000
This commit is contained in:
parent
5010e2d2dd
commit
744298b8a0
@ -120,6 +120,26 @@ EOF
|
||||
UCIDEF_LEDS_CHANGED=1
|
||||
}
|
||||
|
||||
ucidef_set_led_timer() {
|
||||
local cfg="led_$1"
|
||||
local name=$2
|
||||
local sysfs=$3
|
||||
local delayon=$4
|
||||
local delayoff=$5
|
||||
|
||||
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='timer'
|
||||
set system.$cfg.delayon='$delayon'
|
||||
set system.$cfg.delayoff='$delayoff'
|
||||
EOF
|
||||
UCIDEF_LEDS_CHANGED=1
|
||||
}
|
||||
|
||||
ucidef_set_rssimon() {
|
||||
local dev="$1"
|
||||
local refresh="$2"
|
||||
|
Loading…
Reference in New Issue
Block a user