From 05dd1a6814e3a6518dbc2bef1d73ea609313e149 Mon Sep 17 00:00:00 2001 From: mboelen Date: Sat, 5 Sep 2015 18:51:36 +0200 Subject: [PATCH] Remove systemctl to detect virtualization, use systemd-detect-virt instead --- include/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions b/include/functions index 9d815f4e..89e9c662 100644 --- a/include/functions +++ b/include/functions @@ -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