From c7af93aa5a16922f715769f413f5b394e61a791c Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 13 Aug 2012 14:01:37 +0000 Subject: base-files: uci-defaults for rssileds Adds capability to add uci-defaults defining RSSI LEDs Signed-off-by: Daniel Golle git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33164 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/files/lib/functions/uci-defaults.sh | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'package') 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 <