forked from freifunk-franken/firmware
Adrian Schmutzler
776cfe9f86
uci-defaults scripts are supposed to be run once after firstboot and then removed. However, the removal only takes place if the subshell created for the sourced scripts returns exit code 0. For some of the files, the last command returned a different exit code, though, leading to the script remaining in its location and being executed for every boot. To prevent cases like the latter, this adds an "exit 0" to all uci-defaults files in our package store. While at it, remove the shebang for all these files since they are sourced (and not executed). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
43 lines
928 B
Plaintext
43 lines
928 B
Plaintext
# Copyright 2018 Adrian Schmutzler
|
|
# License GPLv3
|
|
|
|
BOARD="$(uci get board.model.name)"
|
|
|
|
# antenna gain
|
|
case "$BOARD" in
|
|
tl-wr1043nd-v1)
|
|
uci set wireless.radio0.antenna_gain=3
|
|
uci commit wireless
|
|
;;
|
|
ubnt-loco-m|\
|
|
ubnt-loco-m-xw)
|
|
uci set wireless.radio0.antenna_gain=9
|
|
uci commit wireless
|
|
;;
|
|
ubnt-nano-m)
|
|
uci set wireless.radio0.antenna_gain=11
|
|
uci commit wireless
|
|
;;
|
|
ubnt-pico-m)
|
|
uci set wireless.radio0.antenna_gain=12
|
|
uci commit wireless
|
|
;;
|
|
ubnt-unifi)
|
|
# No support for Unifi AP Pro!
|
|
uci set wireless.radio0.antenna_gain=3
|
|
uci commit wireless
|
|
;;
|
|
ubnt-unifiac-lite)
|
|
# These are the values for the AC MESH.
|
|
# The actual AC Lite has different values
|
|
uci set wireless.radio0.antenna_gain=4
|
|
uci set wireless.radio1.antenna_gain=3
|
|
uci commit wireless
|
|
;;
|
|
esac
|
|
|
|
# rssileds: always disable if package is installed
|
|
[ -x "/etc/init.d/rssileds" ] && /etc/init.d/rssileds disable
|
|
|
|
exit 0
|