git.annexia.org
/
virt-what.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix virt-what-cpuid-helper.
[virt-what.git]
/
virt-what.in
diff --git
a/virt-what.in
b/virt-what.in
index
d037a99
..
f685461
100644
(file)
--- a/
virt-what.in
+++ b/
virt-what.in
@@
-42,7
+42,7
@@
use_sysctl() {
# Lacking /proc, on some systems sysctl can be used instead.
OS=$(uname) || fail "failed to get operating system name"
# Lacking /proc, on some systems sysctl can be used instead.
OS=$(uname) || fail "failed to get operating system name"
- [ "$OS" =
=
"OpenBSD" ]
+ [ "$OS" = "OpenBSD" ]
}
fail () {
}
fail () {
@@
-233,10
+233,6
@@
fi
if [ "$cpuid" = "XenVMMXenVMM" ] &&
! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then
echo xen; echo xen-hvm
if [ "$cpuid" = "XenVMMXenVMM" ] &&
! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then
echo xen; echo xen-hvm
- # Check for AWS
- if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
- echo aws
- fi
skip_qemu_kvm=true
elif [ -d "${root}/proc/xen" ]; then
echo xen
skip_qemu_kvm=true
elif [ -d "${root}/proc/xen" ]; then
echo xen
@@
-392,3
+388,12
@@
if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then
fi
fi
fi
fi
fi
fi
+
+# Check for AWS.
+# AWS on Xen.
+if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
+ echo aws
+# AWS on baremetal or KVM.
+elif echo "$dmi" | grep -q 'Vendor: Amazon EC2'; then
+ echo aws
+fi