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/ceilometer b/lib/ceilometer
index 0fae397..41a5f53 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -40,7 +40,7 @@
if [ -d $CEILOMETER_DIR/bin ] ; then
CEILOMETER_BIN_DIR=$CEILOMETER_DIR/bin
else
- CEILOMETER_BIN_DIR=/usr/local/bin
+ CEILOMETER_BIN_DIR=$(get_python_exec_prefix)
fi
# cleanup_ceilometer() - Remove residual data files, anything left over from previous