Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-10-27 10:30:25 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-10-27 10:30:25 +0300
commit43d3088a04854bcf1fb09ed2b5d50c3b7dd25267 (patch)
treec195b5af90207baa3186b9fc40549e99e3619edf /include/helper_configure
parentdb0ebcd3740d3d16812848eb7cf00bb2c5c845c2 (diff)
Check for presence of custom.prf, otherwise quit with suggestion
Diffstat (limited to 'include/helper_configure')
-rw-r--r--include/helper_configure8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/helper_configure b/include/helper_configure
index 77534d59..a31b8d6f 100644
--- a/include/helper_configure
+++ b/include/helper_configure
@@ -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