]> xenbits.xensource.com Git - xen.git/commitdiff
tools/hotplug: Add a qemu-ifup script on NetBSD
authorManuel Bouyer <bouyer@netbsd.org>
Wed, 3 Feb 2021 16:54:18 +0000 (17:54 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Feb 2021 21:26:41 +0000 (21:26 +0000)
On NetBSD, qemu-xen will use a qemu-ifup script to setup the tap interfaces
(as qemu-xen-traditional used to). Copy the script from qemu-xen-traditional,
and install it on NetBSD. While there document parameters and environnement
variables.

Signed-off-by: Manuel Bouyer <bouyer@netbsd.org>
Acked-by: Ian Jackson <iwj@xenproject.org>
tools/hotplug/NetBSD/Makefile
tools/hotplug/NetBSD/qemu-ifup [new file with mode: 0644]

index 114b2232074f7c49b4a47b4d72c0343e41e9ed14..f909ffa3675520834abaa03dc6129e237fb6a2c8 100644 (file)
@@ -7,6 +7,7 @@ XEN_SCRIPTS += locking.sh
 XEN_SCRIPTS += block
 XEN_SCRIPTS += vif-bridge
 XEN_SCRIPTS += vif-ip
+XEN_SCRIPTS += qemu-ifup
 
 XEN_SCRIPT_DATA =
 XEN_RCD_PROG = rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
diff --git a/tools/hotplug/NetBSD/qemu-ifup b/tools/hotplug/NetBSD/qemu-ifup
new file mode 100644 (file)
index 0000000..4305419
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+#called by qemu when a HVM domU is started.
+# first parameter is tap interface, second is the bridge name
+# environement variable $XEN_DOMAIN_ID contains the domU's ID,
+# which can be used to retrieve extra parameters from the xenstore.
+
+ifconfig $1 up
+exec /sbin/brconfig $2 add $1