@@ -2,7 +2,7 @@ XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
# Xen script dir and scripts to go there.
-XEN_SCRIPTS = vif-bridge
+XEN_SCRIPTS = vif-bridge block
XEN_SCRIPT_DATA =
new file mode 100644
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+#
+# FreeBSD hotplug script for attaching disks
+#
+# Parameters:
+# $1: xenstore backend path of the vbd
+# $2: action, either "add" or "remove"
+#
+# Environment variables:
+# None
+#
+
+path=$1
+action=$2
+params=$(xenstore-read "$path/params")
+
+case $action in
+add)
+ xenstore-write $path/physical-device-path $params
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac