From b8a0190e82125a17eb82a36402cb7ae0321cd6b3 Mon Sep 17 00:00:00 2001 From: David <2069735+Marzal@users.noreply.github.com> Date: Thu, 18 Jul 2019 18:58:11 +0200 Subject: [PATCH] Fix grep in PROFILEVALUE Make it work with new profile format --- include/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions b/include/functions index 24facbdc..87286aa1 100644 --- a/include/functions +++ b/include/functions @@ -208,10 +208,10 @@ # If 'file' is an directory, use -d if [ -d ${CHECKFILE} ]; then FILEVALUE=$(ls -d -l ${CHECKFILE} | cut -c 2-10) - PROFILEVALUE=$(grep '^permdir' ${PROFILE} | grep ":${CHECKFILE}:" | cut -d: -f3) + PROFILEVALUE=$(grep '^permdir' ${PROFILE} | grep "=${CHECKFILE}:" | cut -d: -f2) else FILEVALUE=$(ls -l ${CHECKFILE} | cut -c 2-10) - PROFILEVALUE=$(grep '^permfile' ${PROFILE} | grep ":${CHECKFILE}:" | cut -d: -f3) + PROFILEVALUE=$(grep '^permfile' ${PROFILE} | grep "=${CHECKFILE}:" | cut -d: -f2) fi if [ "${FILEVALUE}" = "${PROFILEVALUE}" ]; then PERMS="OK"; else PERMS="BAD"; fi fi