mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
cpuinfo: try something
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
0b7fe7be09
commit
0313d16a40
@ -9,16 +9,12 @@
|
||||
VENDOR=""
|
||||
FAMILY=""
|
||||
SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))"
|
||||
CORES="$(dmidecode -t processor | grep "Core Count" | head -1 | cut -d: -f2)"
|
||||
if [ -z ${CORES} ]; then
|
||||
CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)"
|
||||
fi
|
||||
SPEED="$(dmidecode -t processor | grep "Max Speed" | head -1 | cut -d: -f2 | cut -d ' ' -f2)"
|
||||
if [ -z ${SPEED} ]; then
|
||||
SPEED="$(grep 'cpu MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2)"
|
||||
SPEED="${SPEED%.*}"
|
||||
fi
|
||||
CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)"
|
||||
SPEED="$(echo $(($(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2 | awk '{print $NF}' | tr -d -c 0-9) * 10)))"
|
||||
|
||||
while [ ${SPEED} -lt 1000 ]; do
|
||||
SPEED="$((${SPEED} * 10))"
|
||||
done
|
||||
FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js"
|
||||
FILE_GZ="${FILE_JS}.gz"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user