qemu.wrapper

Path: lib/boxgrinder-build/helpers/qemu.wrapper
Last Update: Sat Sep 10 09:36:20 +0000 2011

#!/bin/sh

if [ "`echo "$@" | grep "kvm" | wc -l`" -eq "1" ]; then

  args=( "$@" "-no-kvm" )

else

  args=( "$@" )

fi

if [ "`uname -a | grep x86_64 | wc -l`" -eq "1" ]; then

  bin=/usr/bin/qemu-system-x86_64

else

  bin=/usr/bin/qemu

fi

exec $bin "${args[@]}"

[Validate]