#!/bin/sh
domid=
for i; do
    if [ "$domid" = "_NEXT_" ]; then
	domid=$i
	break
    elif [ "$i" = "-d" ]; then
	domid=_NEXT_
    fi
done
exec "/usr/lib/xen/bin/qemu-dm" "$@"
