Skip to content

Commit

Permalink
Clean up VM guest detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Bacon committed Nov 14, 2021
1 parent 6311361 commit c38fd64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions desktop-installer
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,26 @@ EOM

vbox_guest()
{
sysctl dev.acpi.0.%desc 2> /dev/null | fgrep -q VBOX
sysctl kern.vm_guest | fgrep -iq vbox
return $?
}

parallels_guest()
{
sysctl kern.vm_guest | fgrep -iq parallels
return $?
}

vmware_guest()
{
sysctl kern.vm_guest | fgrep -iq vmware
return $?
}

vm_guest()
{
# FIXME: Add support for other hypervisors and emulators
vbox_guest || parallels_guest || vmware_guest

return $?
}

Expand Down

0 comments on commit c38fd64

Please sign in to comment.