Check for presence of custom.prf, otherwise quit with suggestion

This commit is contained in:
Michael Boelen 2016-10-27 09:30:25 +02:00
parent db0ebcd374
commit 43d3088a04
1 changed files with 6 additions and 2 deletions

View File

@ -62,11 +62,15 @@
elif [ ${CONFIGURE_SETTINGS} -eq 1 ]; then
# Determine where profiles are stored
if [ "${PROFILEDIR}" = "" ]; then
if [ -z "${PROFILEDIR}" ]; then
${ECHOCMD} "Can not configure Lynis, as profile directory is unknown"
ExitFatal
fi
if [ "${CUSTOM_PROFILE}" = "" ]; then ${ECHOCMD} "No custom profile found yet."; fi
if [ -z "${CUSTOM_PROFILE}" ]; then
${ECHOCMD} "No custom profile found yet."
${ECHOCMD} "Suggestion: create one with 'touch custom.prf' or 'touch /etc/lynis/custom.prf'"
ExitFatal
fi
FIND=$(echo ${HELPER_PARAMERS} | grep " ")
if [ ! "${FIND}" = "" ]; then ${ECHOCMD} "Found invalid character (space) in configuration string"; ExitFatal; fi