Skip to content

Commit

Permalink
install_easy: dmi based virtualization detect
Browse files Browse the repository at this point in the history
  • Loading branch information
bol-van committed Apr 13, 2022
1 parent 64f075e commit 341b2ab
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion install_easy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,21 @@ check_dns()
check_virt()
{
echo \* checking virtualization
local vm s v
if exists systemd-detect-virt; then
local vm=$(systemd-detect-virt --vm)
vm=$(systemd-detect-virt --vm)
elif [ -f /sys/class/dmi/id/product_name ]; then
read s </sys/class/dmi/id/product_name
for v in KVM QEMU VMware VMW VirtualBox Xen Bochs Parallels BHYVE Hyper-V; do
case "$s" in
"$v"*)
vm=$v
break
;;
esac
done
fi
if [ -n "$vm" ]; then
if [ "$vm" = "none" ]; then
echo running on bare metal
else
Expand Down Expand Up @@ -911,6 +924,7 @@ install_openwrt()
check_location copy_openwrt
install_binaries
check_dns
check_virt

local FWTYPE_OLD=$FWTYPE

Expand Down

0 comments on commit 341b2ab

Please sign in to comment.