diff --git a/cryptest.sh b/cryptest.sh index f0d69627..66e78d56 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -336,6 +336,7 @@ fi CPU_FREQ=0.5 if [[ (-e "/proc/cpuinfo") ]]; then CPU_FREQ=$(cat /proc/cpuinfo | grep 'MHz' | head -1 | awk '{print $4}') + if [[ -z "$CPU_FREQ" ]]; then CPU_FREQ=512; fi CPU_FREQ=$(awk "BEGIN {print $CPU_FREQ/1024}") elif [[ (-e "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq") ]]; then CPU_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)