Fix autoinstalls to work around a modern d-i bug
[invirt/packages/invirt-xen-config.git] / qemu-ifup.invirt
index 588bb92..756006d 100755 (executable)
@@ -1,17 +1,17 @@
 #!/bin/sh
 
-echo "config qemu network with xen bridge for $@"
+echo "config qemu network with invirtroute for $@"
 
 if [ -z "$domid" ]; then
     echo "domid is not set!!!" >&2
     exit 1
 fi
 
-dev=$1
+INTERFACE=$1
+type_if=tap
 ifnum=${1##*.}
 qemu_online=yes
-XENBUS_PATH=/local/domain/0/backend/vif/${domid}/${ifnum}
 vif=vif${domid}.${ifnum}
-export vif qemu_online XENBUS_PATH dev 
+export vif qemu_online INTERFACE type_if
 
-exec /etc/xen/scripts/vif-invirtroute online
+exec /etc/xen/scripts/vif-invirtroute add netdev=$(invirt-getconf xen.iface)