luci-app-cpufreq: enable uci silent mode

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-05-09 21:56:25 +08:00
parent f9b12cf57b
commit 4401a159f7
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -1,12 +1,12 @@
#!/bin/sh
uci_write_config() {
uci set cpufreq.cpufreq.governor$1="$2"
uci set cpufreq.cpufreq.minfreq$1="$3"
uci set cpufreq.cpufreq.maxfreq$1="$4"
[ -n "$5" ] && uci set cpufreq.cpufreq.sdfactor$1="$5"
[ -n "$6" ] && uci set cpufreq.cpufreq.upthreshold$1="$6"
uci commit cpufreq
uci -q set cpufreq.cpufreq.governor$1="$2"
uci -q set cpufreq.cpufreq.minfreq$1="$3"
uci -q set cpufreq.cpufreq.maxfreq$1="$4"
[ -n "$5" ] && uci -q set cpufreq.cpufreq.sdfactor$1="$5"
[ -n "$6" ] && uci -q set cpufreq.cpufreq.upthreshold$1="$6"
uci -q commit cpufreq
}
CPU_POLICYS="$(find '/sys/devices/system/cpu/cpufreq/policy'* -maxdepth 0 | grep -Eo '[0-9]+')"