mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Added --rootdir for forensics
This commit is contained in:
parent
bf7b8ab44e
commit
242f91ab97
@ -289,6 +289,22 @@
|
||||
PURPLE="${NORMAL}";
|
||||
;;
|
||||
|
||||
# Root directory (useful for forensics)
|
||||
--rootdir | --root-dir)
|
||||
if [ $# -gt 1 ]; then
|
||||
shift
|
||||
if [ -d $1 ]; then
|
||||
ROOTDIR="$1"
|
||||
else
|
||||
echo "Invalid rootdir provided (does not exist)"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Need a root directory (e.g. /mnt/forensics)"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# Skip execution of plugins
|
||||
--skip-plugins | --no-plugins)
|
||||
SKIP_PLUGINS=1
|
||||
|
1
lynis
1
lynis
@ -606,6 +606,7 @@ ${NORMAL}
|
||||
echo " Auditor: ${AUDITORNAME}"
|
||||
echo " Test category: ${TEST_CATEGORY_TO_CHECK}"
|
||||
echo " Test group: ${TEST_GROUP_TO_CHECK}"
|
||||
if [ ! "${ROOTDIR}" = "/" ]; then echo " Root directory: ${ROOTDIR}"; fi
|
||||
echo " ---------------------------------------------------"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user