From 1d1cd31f5ab677afc8231fdfe8b27dbcac56854c Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 1 Aug 2022 11:52:46 +0800 Subject: [PATCH] up --- plugins/mysql/versions/5.5/install.sh | 4 ++-- plugins/mysql/versions/5.6/install.sh | 4 ++-- plugins/mysql/versions/5.7/install.sh | 4 ++-- plugins/mysql/versions/8.0/install.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 3885af353..2d0d596ad 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -38,8 +38,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 40ac44c5d..2d9efb285 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -41,8 +41,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index fb36229e8..de237fb09 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -43,8 +43,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index f935d8a3a..0eeb0ed11 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -80,8 +80,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else