diff options
author | David <2069735+Marzal@users.noreply.github.com> | 2019-07-18 19:58:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 19:58:11 +0300 |
commit | b8a0190e82125a17eb82a36402cb7ae0321cd6b3 (patch) | |
tree | 67b0fd7cc649894bbee12682b62cdfe37cf15628 /include/functions | |
parent | 4d5a0c59c783d0d644fc8b0dd8fe45745ce2d5a1 (diff) |
Fix grep in PROFILEVALUE
Make it work with new profile format
Diffstat (limited to 'include/functions')
-rw-r--r-- | include/functions | 4 |
1 files 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 |