From d900fc5d3e742aaa72a683759a342567529cfbd0 Mon Sep 17 00:00:00 2001 From: Nicolas Charles Date: Tue, 24 Oct 2023 17:06:18 +0200 Subject: [PATCH] Work in progress --- rudder-server/SOURCES/patches/jetty/jetty-init-sizecheck.patch | 2 +- .../SOURCES/patches/jetty/jetty-init-stop-forcestop.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rudder-server/SOURCES/patches/jetty/jetty-init-sizecheck.patch b/rudder-server/SOURCES/patches/jetty/jetty-init-sizecheck.patch index 794bd3074..b7b5ac0a5 100644 --- a/rudder-server/SOURCES/patches/jetty/jetty-init-sizecheck.patch +++ b/rudder-server/SOURCES/patches/jetty/jetty-init-sizecheck.patch @@ -13,7 +13,7 @@ + TOTAL_MEM_NEEDED=$((((${1})*100)/90)) + TOTAL_MEM_AVAILABLE=$(($(free -m|awk '/^Mem:/{print $2}')+$(free -m|awk '/^Swap:/{print $2}'))) + if [ ${TOTAL_MEM_AVAILABLE} -le ${TOTAL_MEM_NEEDED} ]; then -+ echo "WARNING: Not enough free memory to start Jetty (about ${TOTAL_MEM_NEEDED}MB are needed). Trying anyway, but> ++ echo "WARNING: Not enough free memory to start Jetty (about ${TOTAL_MEM_NEEDED}MB are needed). Trying anyway, but the application is likely to fail." + fi +} + diff --git a/rudder-server/SOURCES/patches/jetty/jetty-init-stop-forcestop.patch b/rudder-server/SOURCES/patches/jetty/jetty-init-stop-forcestop.patch index 0253a0c0d..72e1240fb 100644 --- a/rudder-server/SOURCES/patches/jetty/jetty-init-stop-forcestop.patch +++ b/rudder-server/SOURCES/patches/jetty/jetty-init-stop-forcestop.patch @@ -14,7 +14,7 @@ + fi +elif [ -n "${ns}" ]; then # we have namespaces + # the sed is here to prepend a fake user field that is removed by the -o option (it is never used) -+ PS_COMMAND="eval ps --no-header -e -O utsns | grep -E '^[[:space:]]*[[:digit:]]*[[:space:]]+${ns}' | sed 's/^/user > ++ PS_COMMAND="eval ps --no-header -e -O utsns | grep -E '^[[:space:]]*[[:digit:]]*[[:space:]]+${ns}' | sed 's/^/user /'" +else # standard unix + PS_COMMAND="ps -ef" +fi