1#!/bin/sh -e
2#
3# FreeBSD hotplug script for attaching disks
4#
5# Parameters:
6#	$1: xenstore backend path of the vbd
7#	$2: action, either "add" or "remove"
8#
9# Environment variables:
10#	None
11#
12
13path=$1
14action=$2
15params=$(xenstore-read "$path/params")
16
17case $action in
18add)
19	xenstore-write $path/physical-device-path $params
20	exit 0
21	;;
22*)
23	exit 0
24	;;
25esac
26