Remove systemctl to detect virtualization, use systemd-detect-virt instead

This commit is contained in:
mboelen 2015-09-05 18:51:36 +02:00
parent 461920ff72
commit 05dd1a6814

View File

@ -605,9 +605,9 @@
fi
# systemd
if [ "${SHORT}" = "" -a ! "${SYSTEMCTLBINARY}" = "" ]; then
logtext "Test: trying to guess virtualization technology with systemctl"
FIND=`${SYSTEMCTLBINARY} | grep "^Virtualization=" | awk -F= '{ print $2 }'`
if [ "${SHORT}" = "" -a -x /usr/bin/systemd-detect-virt ]; then
logtext "Test: trying to guess virtualization technology with systemd-detect-virt"
FIND=`/usr/bin/systemd-detect-virt`
if [ ! "${FIND}" = "" ]; then
SHORT="${FIND}"
fi