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

Force CPU speed for RPI if USB connected

This commit is contained in:
Ycarus 2018-08-02 22:38:58 +02:00
parent d90e16fda0
commit bb27b222b0

View file

@ -39,10 +39,16 @@ interface_multipath_settings() {
local enabled local enabled
config_get enabled "$config" auto "1" config_get enabled "$config" auto "1"
[ "$enabled" = "0" ] && return 0
config_get iface "$config" ifname config_get iface "$config" ifname
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
# Force scaling freq for RPI if USB is connected
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ -n "$(echo $iface | grep usb)" ] {
uci -q set openmptcprouter.settings.scaling_min_freq=$(uci -q get openmptcprouter.settings.scaling_max_freq)
}
[ "$enabled" = "0" ] && return 0
count=$(($count+1)) count=$(($count+1))
id=$count id=$count
[ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0 [ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0