From bb696a04f12193ec06432fcf8e3312a601935b0d Mon Sep 17 00:00:00 2001 From: mboelen Date: Tue, 26 May 2015 11:13:47 +0200 Subject: [PATCH] Improved detection of directories in logrotate --- include/tests_logging | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/tests_logging b/include/tests_logging index 0d8189a9..7346365a 100644 --- a/include/tests_logging +++ b/include/tests_logging @@ -274,7 +274,7 @@ Register --test-no LOGG-2150 --weight L --preqs-met ${PREQS_MET} --network NO --description "Checking directories in logrotate configuration" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking which directories can be found in logrotate configuration" - FIND=`${LOGROTATEBINARY} -d -v /etc/logrotate.conf 2>&1 | egrep "considering log|skipping" | grep -v '*' | sort | uniq | awk '{ if ($2=="log") { print $3 } }' | sed 's/\/*[a-zA-Z_.-]*$//g' | sort | uniq` + FIND=`${LOGROTATEBINARY} -d -v /etc/logrotate.conf 2>&1 | egrep "considering log|skipping" | grep -v '*' | sort | uniq | awk '{ if ($2=="log") { print $3 } }' | sed 's@/[^/]*$@@g' | sort | uniq` if [ "${FIND}" = "" ]; then logtext "Result: nothing found" else @@ -285,7 +285,6 @@ report "log_directory[]=${I}" else logtext "Directory could not be found: ${I}" - # YYY strip more parts of the name, until it can be found (and stop at /) fi done fi