Introduce get_python_exec_prefix function.
get_python_exec_prefix returns the path to the direcotry where python
executables are installed, that is /usr/bin on Fedora and /usr/local/bin
everywhere else.
It is used to properly locate OpenStack executables.
Fixes: bug #1068386
Change-Id: I228498ebe2762568d00757d065e37377ee2c8fb3
diff --git a/lib/nova b/lib/nova
index 7e5bb99..4116278 100644
--- a/lib/nova
+++ b/lib/nova
@@ -49,7 +49,7 @@
if [[ -d $NOVA_DIR/bin ]]; then
NOVA_BIN_DIR=$NOVA_DIR/bin
else
- NOVA_BIN_DIR=/usr/local/bin
+ NOVA_BIN_DIR=$(get_python_exec_prefix)
fi
# Set the paths of certain binaries