| ... | ... |
@@ -28,7 +28,6 @@ function install_libvirt {
|
| 28 | 28 |
else |
| 29 | 29 |
install_package qemu-kvm |
| 30 | 30 |
install_package libguestfs0 |
| 31 |
- install_package python-guestfs |
|
| 32 | 31 |
fi |
| 33 | 32 |
install_package libvirt-bin libvirt-dev |
| 34 | 33 |
pip_install_gr libvirt-python |
| ... | ... |
@@ -37,7 +36,6 @@ function install_libvirt {
|
| 37 | 37 |
install_package kvm |
| 38 | 38 |
install_package libvirt libvirt-devel |
| 39 | 39 |
pip_install_gr libvirt-python |
| 40 |
- install_package python-libguestfs |
|
| 41 | 40 |
fi |
| 42 | 41 |
} |
| 43 | 42 |
|
| ... | ... |
@@ -26,7 +26,7 @@ source $TOP_DIR/lib/nova_plugins/functions-libvirt |
| 26 | 26 |
# -------- |
| 27 | 27 |
|
| 28 | 28 |
# File injection is disabled by default in Nova. This will turn it back on. |
| 29 |
-ENABLE_FILE_INJECTION=${ENABLE_FILE_INJECTION:-False}
|
|
| 29 |
+ENABLE_FILE_INJECTION=$(trueorfalse False ENABLE_FILE_INJECTION) |
|
| 30 | 30 |
|
| 31 | 31 |
|
| 32 | 32 |
# Entry Points |
| ... | ... |
@@ -60,7 +60,6 @@ function configure_nova_hypervisor {
|
| 60 | 60 |
iniset $NOVA_CONF DEFAULT vnc_enabled "false" |
| 61 | 61 |
fi |
| 62 | 62 |
|
| 63 |
- ENABLE_FILE_INJECTION=$(trueorfalse False ENABLE_FILE_INJECTION) |
|
| 64 | 63 |
if [[ "$ENABLE_FILE_INJECTION" = "True" ]] ; then |
| 65 | 64 |
# When libguestfs is available for file injection, enable using |
| 66 | 65 |
# libguestfs to inspect the image and figure out the proper |
| ... | ... |
@@ -97,6 +96,14 @@ function install_nova_hypervisor {
|
| 97 | 97 |
yum_install libcgroup-tools |
| 98 | 98 |
fi |
| 99 | 99 |
fi |
| 100 |
+ |
|
| 101 |
+ if [[ "$ENABLE_FILE_INJECTION" = "True" ]] ; then |
|
| 102 |
+ if is_ubuntu; then |
|
| 103 |
+ install_package python-guestfs |
|
| 104 |
+ elif is_fedora || is_suse; then |
|
| 105 |
+ install_package python-libguestfs |
|
| 106 |
+ fi |
|
| 107 |
+ fi |
|
| 100 | 108 |
} |
| 101 | 109 |
|
| 102 | 110 |
# start_nova_hypervisor - Start any required external services |