mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
misc: rework latest changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
64f7bc5d29
commit
e2b35dea64
@ -10,18 +10,12 @@ PLATFORM="$(/bin/get_key_value /etc.defaults/synoinfo.conf unique | cut -d"_" -f
|
||||
CPUCORE=$(cat /proc/cpuinfo 2>/dev/null | grep processor | wc -l)
|
||||
while true; do
|
||||
CPUCORE=$((CPUCORE - 1))
|
||||
if [ "${PLATFORM}" == "eypc7002" ]; then
|
||||
if grep -qw "schedutil" /sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors; then
|
||||
echo "schedutil" >/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors
|
||||
if [ "${PLATFORM}" = "epyc7002" ]; then
|
||||
echo "schedutil" >"/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_governor"
|
||||
echo "set schedutil governor for ${PLATFORM} cpu: ${CPUCORE}"
|
||||
else
|
||||
echo "performance" >/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors
|
||||
fi
|
||||
else
|
||||
if grep -qw "ondemand" /sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors; then
|
||||
echo "ondemand" >/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors
|
||||
else
|
||||
echo "performance" >/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_available_governors
|
||||
fi
|
||||
echo "ondemand" >"/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_governor"
|
||||
echo "set ondemand governor for ${PLATFORM} cpu: ${CPUCORE}"
|
||||
fi
|
||||
if [ ${CPUCORE} -eq 0 ]; then
|
||||
break
|
||||
|
@ -146,9 +146,8 @@ elif [ "${1}" = "late" ]; then
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "User=root" >>${DEST}
|
||||
echo "Restart=always" >>${DEST}
|
||||
echo "RestartSec=30" >>${DEST}
|
||||
echo "Type=oneshot" >>${DEST}
|
||||
echo "RemainAfterExit=yes" >>${DEST}
|
||||
echo "ExecStart=/usr/sbin/governor.sh" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[X-Synology]" >>${DEST}
|
||||
|
Loading…
Reference in New Issue
Block a user