$NetBSD: patch-hotplug_NetBSD_vif-ip,v 1.2 2015/08/23 16:17:12 spz Exp $

--- hotplug/NetBSD/vif-ip.orig	2014-09-02 06:22:57.000000000 +0000
+++ hotplug/NetBSD/vif-ip
@@ -24,6 +24,10 @@ case $xstatus in
 	xfid=$(xenstore-read "$xpath/frontend-id")
 	xhandle=$(xenstore-read "$xpath/handle")
 	iface=$(xenstore-read "$xpath/vifname")
+	iface=$(xenstore-read "$xpath/vifname") || true
+	if [ x${iface} = "x" ] ; then
+		iface=xvif$xfid.$xhandle
+	fi
 	ifconfig $iface $xip up
 	xenstore-write $xpath/hotplug-status connected
 	exit 0
