From b39d89f0db161916b1acbda58f99604f6f2d724d Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 1 Sep 2023 13:57:49 +0200 Subject: [PATCH] Replace deprecated vmware-detect with virt-what/imvirt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As of git commit 0c1cd5d0cbee in grml-scripts we no longer ship our vmware-detect binary, so instead rely on virt-what and imvirt. Output of virt-what executed inside a VM on a VMware cluster is `vmware` and `VMware ESX server` for imvirt. Thanks: Christoph Biedl and András Korn for feedback --- autoconfig.functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoconfig.functions b/autoconfig.functions index 891242e..af3a117 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -184,7 +184,8 @@ KVM=false VIRTUALBOX=false VMWARE=false -if vmware-detect &>/dev/null; then +if virt-what 2>/dev/null | grep -q 'vmware' || \ + imvirt 2>/dev/null | grep -i "vmware" ; then VIRTUAL=true; VMWARE=true; VIRTUAL_ENV='VMware' fi -- 2.1.4