From ca857b7a50506047aff1fef7b8ed3faa31f5075b Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Mon, 13 Aug 2012 14:01:37 +0000 Subject: [PATCH] base-files: uci-defaults for rssileds Adds capability to add uci-defaults defining RSSI LEDs Signed-off-by: Daniel Golle SVN-Revision: 33164 --- .../files/lib/functions/uci-defaults.sh | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 2cbf69a6ff..477c00cfd4 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -94,6 +94,50 @@ EOF UCIDEF_LEDS_CHANGED=1 } +ucidef_set_led_rssi() { + local cfg="led_$1" + local name=$2 + local sysfs=$3 + local iface=$4 + local minq=$5 + local maxq=$6 + local offset=$7 + local factor=$8 + + uci -q get system.$cfg && return 0 + + uci batch <