From 4053ac9f971005814ffccc71a284dba27427198d Mon Sep 17 00:00:00 2001 From: George Liu Date: Fri, 18 Dec 2015 07:00:57 +1000 Subject: [PATCH] update tools/hptweaks.sh & inc/zendopcache_tweaks.inc fix redis check --- inc/zendopcache_tweaks.inc | 2 +- tools/hptweaks.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/zendopcache_tweaks.inc b/inc/zendopcache_tweaks.inc index c4527d9c6..7e7b0eba1 100644 --- a/inc/zendopcache_tweaks.inc +++ b/inc/zendopcache_tweaks.inc @@ -1,6 +1,6 @@ opcachehugepages() { # check if redis installed as redis server requires huge pages disabled - if [[ ! "$(rpm -ql redis | grep not)" ]]; then + if [[ "$(rpm -ql redis | grep -o not)" != 'not' ]]; then if [[ -f /sys/kernel/mm/redhat_transparent_hugepage/enabled ]]; then echo never > /sys/kernel/mm/transparent_hugepage/enabled fi diff --git a/tools/hptweaks.sh b/tools/hptweaks.sh index e8e983b2b..47ee97775 100755 --- a/tools/hptweaks.sh +++ b/tools/hptweaks.sh @@ -20,7 +20,7 @@ if [[ "$(cat /etc/redhat-release | awk '{ print $3 }' | cut -d . -f1)" = '6' ]]; fi # check if redis installed as redis server requires huge pages disabled - if [[ ! "$(rpm -ql redis | grep not)" ]]; then + if [[ "$(rpm -ql redis | grep -o not)" != 'not' ]]; then if [[ -f /sys/kernel/mm/redhat_transparent_hugepage/enabled ]]; then echo never > /sys/kernel/mm/transparent_hugepage/enabled fi