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/glance b/lib/glance
index 1c56a67..5d48129 100644
--- a/lib/glance
+++ b/lib/glance
@@ -44,7 +44,7 @@
if [[ -d $GLANCE_DIR/bin ]]; then
GLANCE_BIN_DIR=$GLANCE_DIR/bin
else
- GLANCE_BIN_DIR=/usr/local/bin
+ GLANCE_BIN_DIR=$(get_python_exec_prefix)
fi
# Glance connection info. Note the port must be specified.