X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what.in;h=f6854611baad9ffe330acd8719a5a7d6dd153113;hb=0a0d9fa7c85c5474870cae37832d28ccd899d4ee;hp=d037a992f57a4154d89007f0b93538f41425639e;hpb=d7fd8a7843030d2b1719353edfcd49dba3000122;p=virt-what.git diff --git a/virt-what.in b/virt-what.in index d037a99..f685461 100644 --- 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" - [ "$OS" == "OpenBSD" ] + [ "$OS" = "OpenBSD" ] } 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 - # 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 @@ -392,3 +388,12 @@ if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then 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