From 744298b8a0dc363a802634b5ac5d08e861e65d12 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 17 Jan 2015 13:58:14 +0000 Subject: [PATCH] base-files: Add ucidef_set_led_timer to uci-defaults.sh Signed-off-by: Gerald Kerma SVN-Revision: 44000 --- .../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 6ed0bf117604..eb5b240ee308 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 <