oops, minq and maxq got swapped in package/base-files/files/lib/functions/uci-defaults.sh here, I'll post a corrected version of all that tomorrow...
On 07/08/12 23:42, Daniel Golle wrote: > Adds capability to add uci-defaults defining RSSI LEDs, and uses that > capability > to set them up on the ALL0258N > > Signed-off-by: Daniel Golle <[email protected]> > --- > .../base-files/files/lib/functions/uci-defaults.sh | 44 > ++++++++++++++++++++++ > .../linux/ar71xx/base-files/etc/uci-defaults/leds | 7 ++++ > 2 files changed, 51 insertions(+) > > diff --git a/package/base-files/files/lib/functions/uci-defaults.sh > b/package/base-files/files/lib/functions/uci-defaults.sh > index 2cbf69a..b0540f5 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 maxq=$5 > + local minq=$6 > + local offset=$7 > + local factor=$8 > + > + uci -q get system.$cfg && return 0 > + > + uci batch <<EOF > +set system.$cfg='led' > +set system.$cfg.name='$name' > +set system.$cfg.sysfs='$sysfs' > +set system.$cfg.trigger='rssi' > +set system.$cfg.iface='rssid_$iface' > +set system.$cfg.minq='$minq' > +set system.$cfg.maxq='$maxq' _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
