Merge "Introduce get_python_exec_prefix function."
This commit is contained in:
commit
f3da41a5ee
16
functions
16
functions
@ -1110,17 +1110,23 @@ function add_user_to_group() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Get the path to the direcotry where python executables are installed.
|
||||||
|
# get_python_exec_prefix
|
||||||
|
function get_python_exec_prefix() {
|
||||||
|
if is_fedora; then
|
||||||
|
echo "/usr/bin"
|
||||||
|
else
|
||||||
|
echo "/usr/local/bin"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Get the location of the $module-rootwrap executables, where module is cinder
|
# Get the location of the $module-rootwrap executables, where module is cinder
|
||||||
# or nova.
|
# or nova.
|
||||||
# get_rootwrap_location module
|
# get_rootwrap_location module
|
||||||
function get_rootwrap_location() {
|
function get_rootwrap_location() {
|
||||||
local module=$1
|
local module=$1
|
||||||
|
|
||||||
if is_fedora; then
|
echo "$(get_python_exec_prefix)/$module-rootwrap"
|
||||||
echo "/usr/bin/$module-rootwrap"
|
|
||||||
else
|
|
||||||
echo "/usr/local/bin/$module-rootwrap"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the path to the pip command.
|
# Get the path to the pip command.
|
||||||
|
@ -40,7 +40,7 @@ CEILOMETER_AUTH_CACHE_DIR=${CEILOMETER_AUTH_CACHE_DIR:-/var/cache/ceilometer}
|
|||||||
if [ -d $CEILOMETER_DIR/bin ] ; then
|
if [ -d $CEILOMETER_DIR/bin ] ; then
|
||||||
CEILOMETER_BIN_DIR=$CEILOMETER_DIR/bin
|
CEILOMETER_BIN_DIR=$CEILOMETER_DIR/bin
|
||||||
else
|
else
|
||||||
CEILOMETER_BIN_DIR=/usr/local/bin
|
CEILOMETER_BIN_DIR=$(get_python_exec_prefix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
||||||
|
@ -47,7 +47,7 @@ CINDER_SERVICE_PROTOCOL=${CINDER_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
|||||||
if [[ -d $CINDER_DIR/bin ]]; then
|
if [[ -d $CINDER_DIR/bin ]]; then
|
||||||
CINDER_BIN_DIR=$CINDER_DIR/bin
|
CINDER_BIN_DIR=$CINDER_DIR/bin
|
||||||
else
|
else
|
||||||
CINDER_BIN_DIR=/usr/local/bin
|
CINDER_BIN_DIR=$(get_python_exec_prefix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Name of the lvm volume group to use/create for iscsi volumes
|
# Name of the lvm volume group to use/create for iscsi volumes
|
||||||
|
@ -44,7 +44,7 @@ GLANCE_POLICY_JSON=$GLANCE_CONF_DIR/policy.json
|
|||||||
if [[ -d $GLANCE_DIR/bin ]]; then
|
if [[ -d $GLANCE_DIR/bin ]]; then
|
||||||
GLANCE_BIN_DIR=$GLANCE_DIR/bin
|
GLANCE_BIN_DIR=$GLANCE_DIR/bin
|
||||||
else
|
else
|
||||||
GLANCE_BIN_DIR=/usr/local/bin
|
GLANCE_BIN_DIR=$(get_python_exec_prefix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Glance connection info. Note the port must be specified.
|
# Glance connection info. Note the port must be specified.
|
||||||
|
2
lib/nova
2
lib/nova
@ -49,7 +49,7 @@ NOVA_SERVICE_PROTOCOL=${NOVA_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
|||||||
if [[ -d $NOVA_DIR/bin ]]; then
|
if [[ -d $NOVA_DIR/bin ]]; then
|
||||||
NOVA_BIN_DIR=$NOVA_DIR/bin
|
NOVA_BIN_DIR=$NOVA_DIR/bin
|
||||||
else
|
else
|
||||||
NOVA_BIN_DIR=/usr/local/bin
|
NOVA_BIN_DIR=$(get_python_exec_prefix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the paths of certain binaries
|
# Set the paths of certain binaries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user