mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 16:24:13 +02:00
Check if default profile can be found
This commit is contained in:
parent
98c9f2e3bc
commit
215ed82899
7
lynis
7
lynis
@ -22,7 +22,7 @@
|
|||||||
#
|
#
|
||||||
# Program information
|
# Program information
|
||||||
PROGRAM_name="Lynis"
|
PROGRAM_name="Lynis"
|
||||||
PROGRAM_version="2.0.0"
|
PROGRAM_version="2.1.0"
|
||||||
PROGRAM_releasedate="25 February 2015"
|
PROGRAM_releasedate="25 February 2015"
|
||||||
PROGRAM_author="CISOfy"
|
PROGRAM_author="CISOfy"
|
||||||
PROGRAM_author_contact="lynis-dev@cisofy.com"
|
PROGRAM_author_contact="lynis-dev@cisofy.com"
|
||||||
@ -287,6 +287,11 @@
|
|||||||
if [ -f ${I} ]; then PROFILE=${I}; fi
|
if [ -f ${I} ]; then PROFILE=${I}; fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if [ "${PROFILE}" = "" ]; then
|
||||||
|
echo "${RED}Fatal error: ${WHITE}No profile defined and could not find default profile${NORMAL}"
|
||||||
|
echo "Search paths used --> ${tPROFILE_TARGETS}"
|
||||||
|
ExitFatal
|
||||||
|
fi
|
||||||
# Initialize and check profile file, auditor name, log file and report file
|
# Initialize and check profile file, auditor name, log file and report file
|
||||||
if [ ! -r ${PROFILE} ]; then echo "Fatal error: Can't open profile file (${PROFILE})"; exit 1; fi
|
if [ ! -r ${PROFILE} ]; then echo "Fatal error: Can't open profile file (${PROFILE})"; exit 1; fi
|
||||||
if [ "${AUDITORNAME}" = "" ]; then AUDITORNAME="[Unknown]"; fi
|
if [ "${AUDITORNAME}" = "" ]; then AUDITORNAME="[Unknown]"; fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user