mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fore RPI scaling speed in openmptcprouter script now
This commit is contained in:
parent
1dad7705af
commit
c204b63f70
2 changed files with 9 additions and 9 deletions
|
@ -9,12 +9,21 @@ omr_intf_del() {
|
|||
}
|
||||
omr_intf_set() {
|
||||
config_get multipath "$1" multipath
|
||||
[ -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)
|
||||
}
|
||||
[ -z "$multipath" ] || [ "$multipath" = "off" ] && return
|
||||
uci -q set openmptcprouter.$1=interface
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local scaling_min_freq scaling_max_freq
|
||||
|
||||
config_load openmptcprouter
|
||||
config_foreach omr_intf_del interface
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
|
||||
config_load openmptcprouter
|
||||
config_get scaling_min_freq settings scaling_min_freq
|
||||
[ -n "$scaling_min_freq" ] && {
|
||||
|
@ -37,10 +46,6 @@ start_service() {
|
|||
# remove sysctl already defined in /etc/sysctl.d/
|
||||
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.conf
|
||||
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.d/10-default.conf
|
||||
|
||||
config_foreach omr_intf_del interface
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
|
|
@ -42,11 +42,6 @@ interface_multipath_settings() {
|
|||
config_get iface "$config" ifname
|
||||
[ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue