mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
This is the default hotplug script for block devices. Its only job is to copy the "params" blkback xenstore node to "physical-device". Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
26 lines
353 B
Bash
26 lines
353 B
Bash
#!/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
|