Merge "devstack: Add paths specific to XenServer Core"
This commit is contained in:
commit
3c98af20fc
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function xapi_plugin_location {
|
function xapi_plugin_location {
|
||||||
for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/"; do
|
for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/" "/usr/lib/xapi/plugins"; do
|
||||||
if [ -d $PLUGIN_DIR ]; then
|
if [ -d $PLUGIN_DIR ]; then
|
||||||
echo $PLUGIN_DIR
|
echo $PLUGIN_DIR
|
||||||
return 0
|
return 0
|
||||||
|
@ -32,7 +32,7 @@ function get_mount_device() {
|
|||||||
vbd_uuid=$1
|
vbd_uuid=$1
|
||||||
|
|
||||||
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
|
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
|
||||||
if [[ "$dev" =~ "sm/" ]]; then
|
if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes \
|
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes \
|
||||||
install kpartx &> /dev/null || true
|
install kpartx &> /dev/null || true
|
||||||
@ -49,7 +49,7 @@ function get_mount_device() {
|
|||||||
|
|
||||||
function clean_dev_mappings() {
|
function clean_dev_mappings() {
|
||||||
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
|
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
|
||||||
if [[ "$dev" =~ "sm/" ]]; then
|
if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
|
||||||
kpartx -dv "/dev/$dev"
|
kpartx -dv "/dev/$dev"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user