summaryrefslogtreecommitdiffstats
path: root/debian/qemu-system-i386.xen-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'debian/qemu-system-i386.xen-wrapper')
-rwxr-xr-xdebian/qemu-system-i386.xen-wrapper29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/qemu-system-i386.xen-wrapper b/debian/qemu-system-i386.xen-wrapper
new file mode 100755
index 00000000..c9484938
--- /dev/null
+++ b/debian/qemu-system-i386.xen-wrapper
@@ -0,0 +1,29 @@
+#! /bin/sh
+# This is a temporarily wrapper for qemu-system-i386 to redirect xen-specific
+# invocations of qemu-system-i386 into xen-specific package if installed.
+#
+xenredir=/usr/libexec/xen-qemu-system-i386
+exe=/usr/libexec/qemu-system-i386
+
+for opt in "$@"; do
+ case "$opt" in
+ -xen-* | --xen-*)
+ if [ -x $xenredir ]; then
+ exe=$xenredir
+ cat <<EOF >&2
+W: $0 binary is not compiled with xen support anymore
+W: redirecting the call to $exe
+W: please update your configs
+EOF
+ else
+ cat <<EOF >&2
+E: $0 binary is not compiled with xen support anymore
+E: please install qemu-system-xen package and update your configs
+EOF
+ fi
+ break
+ ;;
+ esac
+done
+
+exec "$exe" "$@"