Skip to content

Instantly share code, notes, and snippets.

@jasperla
Created August 9, 2017 19:35
Show Gist options
  • Select an option

  • Save jasperla/3de28386512225f0cd0787f0c8ac2338 to your computer and use it in GitHub Desktop.

Select an option

Save jasperla/3de28386512225f0cd0787f0c8ac2338 to your computer and use it in GitHub Desktop.
missing have_cpuinfo check
grep: /proc/cpuinfo: No such file or directory
Index: virt-what.in
--- virt-what.in.orig
+++ virt-what.in
@@ -308,7 +308,7 @@ if ! "$skip_qemu_kvm"; then
# option, since /proc/cpuinfo will not contain the QEMU
# string. QEMU 2.10 added a new CPUID leaf, so this
# problem only triggered for older QEMU
- if grep -q 'QEMU' "${root}/proc/cpuinfo"; then
+ if have_cpuinfo && grep -q 'QEMU' "${root}/proc/cpuinfo"; then
echo qemu
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment