mirror of https://github.com/CISOfy/lynis.git
Correct path to cgroup file
This commit is contained in:
parent
27054e2f2e
commit
404bd9ad4c
|
@ -1085,10 +1085,10 @@
|
|||
|
||||
IsContainer() {
|
||||
FOUND=0
|
||||
if [ -e /proc/1/cgroups ]; then
|
||||
FIND=$(cat /proc/1/cgroups | grep -i docker)
|
||||
if [ -e /proc/1/cgroup ]; then
|
||||
FIND=$(cat /proc/1/cgroup | grep -i docker)
|
||||
if [ $? -eq 0 ]; then
|
||||
LogText "Result: found Docker in cgroups, so we are running in Docker container"
|
||||
LogText "Result: found Docker in control groups (/proc/1/cgroup), so we are running in Docker container"
|
||||
CONTAINER_TYPE="Docker"; FOUND=1
|
||||
EXITCODE=0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue