From 1f0e7b120580e15d348975c0359480306675c2fe Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 17 Jan 2015 13:58:14 +0000 Subject: base-files: Add ucidef_set_led_timer to uci-defaults.sh Signed-off-by: Gerald Kerma git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44000 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/files/lib/functions/uci-defaults.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 6ed0bf1176..eb5b240ee3 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -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 <