diff --git a/cpuinfo/all/usr/bin/cpuinfo.sh b/cpuinfo/all/usr/bin/cpuinfo.sh index 6e53c70..188086e 100755 --- a/cpuinfo/all/usr/bin/cpuinfo.sh +++ b/cpuinfo/all/usr/bin/cpuinfo.sh @@ -11,10 +11,12 @@ FAMILY="" SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" 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)))" -[ -n "${SPEED}" ] && SPEED="$(echo $(grep 'cpu MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" -while [ ${SPEED} -lt 1000 ]; do - SPEED="$((${SPEED} * 10))" -done +if [ -z "${SPEED}" ] || [ ${SPEED} -eq 0 ]; then + SPEED="$(echo $(grep 'cpu MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" + while [ ${SPEED} -lt 1000 ]; do + SPEED="$((${SPEED} * 10))" + done +fi FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js" FILE_GZ="${FILE_JS}.gz"