mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 08:14:10 +02:00
Remove systemctl to detect virtualization, use systemd-detect-virt instead
This commit is contained in:
parent
461920ff72
commit
05dd1a6814
@ -605,9 +605,9 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
if [ "${SHORT}" = "" -a ! "${SYSTEMCTLBINARY}" = "" ]; then
|
if [ "${SHORT}" = "" -a -x /usr/bin/systemd-detect-virt ]; then
|
||||||
logtext "Test: trying to guess virtualization technology with systemctl"
|
logtext "Test: trying to guess virtualization technology with systemd-detect-virt"
|
||||||
FIND=`${SYSTEMCTLBINARY} | grep "^Virtualization=" | awk -F= '{ print $2 }'`
|
FIND=`/usr/bin/systemd-detect-virt`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
SHORT="${FIND}"
|
SHORT="${FIND}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user