mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Set RPI default speed at first boot
This commit is contained in:
parent
9c8c29314a
commit
f50c623bc7
1 changed files with 8 additions and 0 deletions
|
@ -7,4 +7,12 @@ uci -q batch <<-EOF >/dev/null
|
||||||
set rpcd.@rpcd[0].timeout=120
|
set rpcd.@rpcd[0].timeout=120
|
||||||
commit rpcd
|
commit rpcd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ "$(uci -q get openmptcprouter.settings.scaling_governor)" != "performance" ] && {
|
||||||
|
# force CPU speed for RPI
|
||||||
|
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
||||||
|
uci -q set openmptcprouter.settings.scaling_max_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
||||||
|
uci -q set openmptcprouter.settings.scaling_governor='performance'
|
||||||
|
}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue