mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
cpuinfo: add fallback for cpufreq
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
3f92c609ab
commit
555067be24
@ -11,7 +11,11 @@ VENDOR=""
|
|||||||
FAMILY="" # str
|
FAMILY="" # str
|
||||||
SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" # str
|
SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" # str
|
||||||
CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)" # str
|
CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)" # str
|
||||||
SPEED="$(echo $(grep 'MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2 | cut -d. -f1))" # int
|
SPEED="$(dmidecode 2>/dev/null | grep MHz | head -1 | cut -d: -f2 | cut -d ' ' -f2))" # int
|
||||||
|
if [ -z "${SPEED}" ] || [[ ! "${SPEED}" =~ ^[0-9]+$ ]]; then
|
||||||
|
SPEED="$(echo $(grep 'MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2 | cut -d. -f1))" # int
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js"
|
FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js"
|
||||||
FILE_GZ="${FILE_JS}.gz"
|
FILE_GZ="${FILE_JS}.gz"
|
||||||
|
Loading…
Reference in New Issue
Block a user