* XenServer Core keeps its Xapi plugins in a different path to XenServer,
in order to comply with the Filesystem Hierarchy Standard.
* XenServer Core mounts devices under /dev/xen/blktap-2 in dom0,
whereas XenServer mounts them under /dev/sm.
Change-Id: I0a66cd03f000f19c8ff63a8ae4231c00fda88380
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
#!/bin/bash |
| 2 | 2 |
|
| 3 | 3 |
function xapi_plugin_location {
|
| 4 |
- for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/"; do |
|
| 4 |
+ for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/" "/usr/lib/xapi/plugins"; do |
|
| 5 | 5 |
if [ -d $PLUGIN_DIR ]; then |
| 6 | 6 |
echo $PLUGIN_DIR |
| 7 | 7 |
return 0 |
| ... | ... |
@@ -32,7 +32,7 @@ function get_mount_device() {
|
| 32 | 32 |
vbd_uuid=$1 |
| 33 | 33 |
|
| 34 | 34 |
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid") |
| 35 |
- if [[ "$dev" =~ "sm/" ]]; then |
|
| 35 |
+ if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then |
|
| 36 | 36 |
DEBIAN_FRONTEND=noninteractive \ |
| 37 | 37 |
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes \ |
| 38 | 38 |
install kpartx &> /dev/null || true |
| ... | ... |
@@ -49,7 +49,7 @@ function get_mount_device() {
|
| 49 | 49 |
|
| 50 | 50 |
function clean_dev_mappings() {
|
| 51 | 51 |
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid") |
| 52 |
- if [[ "$dev" =~ "sm/" ]]; then |
|
| 52 |
+ if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then |
|
| 53 | 53 |
kpartx -dv "/dev/$dev" |
| 54 | 54 |
fi |
| 55 | 55 |
} |