From d0d3ca2a1bc5fc61233351e1f5f5cd462e59407b Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 14 Jul 2015 07:35:59 +0000 Subject: base-files: added option to configure the gpio led trigger in uci-defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Kelleter SVN-Revision: 46341 --- .../base-files/files/lib/functions/uci-defaults.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'package/base-files/files/lib/functions') diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 6577ecd..8ba95a2 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -158,6 +158,26 @@ EOF UCIDEF_LEDS_CHANGED=1 } +ucidef_set_led_trigger_gpio() { + local cfg="led_$1" + local name=$2 + local sysfs=$3 + local gpio=$4 + local inverted=$5 + + uci -q get system.$cfg && return 0 + + uci batch <