mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
Small adjustment to avoid getting error when no files are in APT sources.list.d directory
This commit is contained in:
parent
6f6d51a11a
commit
f465da5351
@ -695,7 +695,7 @@
|
|||||||
fi
|
fi
|
||||||
if [ -d /etc/apt/sources.list.d ]; then
|
if [ -d /etc/apt/sources.list.d ]; then
|
||||||
logtext "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list.d directory"
|
logtext "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list.d directory"
|
||||||
FIND=`egrep "security.debian.org|security.ubuntu.com|-security " /etc/apt/sources.list.d/* | grep -v '#' | sed 's/ /!space!/g'`
|
FIND=`egrep -r "security.debian.org|security.ubuntu.com|-security " /etc/apt/sources.list.d | grep -v '#' | sed 's/ /!space!/g'`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
FOUND=1
|
FOUND=1
|
||||||
Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result OK --color GREEN
|
Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result OK --color GREEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user