1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Set RPI speed if USB to 800000

This commit is contained in:
Ycarus 2018-09-05 22:59:43 +02:00
parent 771a4c9d55
commit 6435a040f9

View file

@ -11,9 +11,10 @@ omr_intf_set() {
config_get multipath "$1" multipath config_get multipath "$1" multipath
config_get ifname "$1" ifname config_get ifname "$1" ifname
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ -n "$(echo $ifname | grep usb)" ] && { [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ -n "$(echo $ifname | grep usb)" ] && {
uci -q set openmptcprouter.settings.scaling_min_freq=$(uci -q get openmptcprouter.settings.scaling_max_freq) uci -q set openmptcprouter.settings.scaling_min_freq=800000
uci -q set openmptcprouter.settings.scaling_max_freq=800000
} }
[ -z "$multipath" ] || [ "$multipath" = "off" ] && return [ -z "$multipath" ] || [ "$multipath" = "off" ] && [ "$1" != "omrvpn" ] && [ "$1" != "glorytun" ] && return
uci -q set openmptcprouter.$1=interface uci -q set openmptcprouter.$1=interface
} }