detect if AES-NI

This commit is contained in:
Sean Wheller 2019-07-29 12:38:09 +02:00
parent 6728d5d7dd
commit a6b3651571
2 changed files with 19 additions and 11 deletions

View File

@ -1,15 +1,5 @@
#!/bin/bash
# This script can be run standalone or as part of install.sh
_EMAIL="user@example.com"
_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
_POOL_SERVER_URL="192.168.4.5"
_POOL_SERVER_PORT="3333"
#################################
_API_ID="null"
_API_WORKER_ID="$HOSTNAME"
@ -21,7 +11,7 @@ _COLORS="true"
_CPU_ENABLED="true"
_CPU_HUGE_PAGES="true"
_CPU_HW_AES="null"
_CPU_HW_AES="$_AES_NI"
_CPU_PRIORITY="null"
_CPU_ASM="true"
_CPU_CN="0 1 2 3"

View File

@ -4,6 +4,15 @@ echo "#################################"
echo " LOADING SETTINGS "
echo "#################################"
_EMAIL="user@example.com"
_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
_POOL_SERVER_URL="192.168.4.5"
_POOL_SERVER_PORT="3333"
#################################
# Set working directory
_WORK_DIR="$(pwd)"
cd $_WORK_DIR
@ -87,6 +96,15 @@ else
echo "vm.nr_hugepages=$_ENV_CORE" | sudo tee -a /etc/sysctl.conf
fi
# Check if CPU supports AES-NI
cpuid | grep -i aes > hw-aes.txt
if grep -q true "hw-aes.txt"; then
_AES_NI=true
else
_AES_NI=false
fi
rm hw-aes.txt
# Run apt maintenance
_APT_MAINETANCE="1"