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
path: root/lynis
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-04-23 18:55:32 +0300
committermboelen <michael@cisofy.com>2016-04-23 18:55:32 +0300
commit904da4d123d6ef74d19f5f1456d93bcccaa39763 (patch)
treeba5814b89e0f825242169a7c675423a0bab12e18 /lynis
parent7823cf60f5bbc8d2fb0cf897e67e8dbdc98d2b19 (diff)
Allow additional profile with --profile
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis10
1 files changed, 8 insertions, 2 deletions
diff --git a/lynis b/lynis
index 5438fa1e..06afea7e 100755
--- a/lynis
+++ b/lynis
@@ -259,11 +259,17 @@ ${NORMAL}
for PLOC in ${tPROFILE_TARGETS}; do
FILE="${PLOC}/${PNAME}"
if [ -r ${FILE} ]; then
- PROFILE=${FILE}
- PROFILES="${PROFILES} ${PROFILE}"
+ PROFILES="${PROFILES} ${FILE}"
fi
done
done
+ # Search any profiles defined with --profile
+ for FILE in ${SEARCH_PROFILES}; do
+ if [ -r ${FILE} ]; then
+ Debug "Found profile defined with --profile"
+ PROFILES="${PROFILES} ${FILE}"
+ fi
+ done
fi
if [ "${PROFILES}" = "" ]; then
echo "${RED}Fatal error: ${WHITE}No profile defined and could not find default profile${NORMAL}"