Add partial openSUSE/SLE support
Note that this is the first part of the support. A second part involves
dealing with the package names.
Among the changes:
- add several functions to determine some distro-specific behavior (how
to call usermod, if some features are available on the distro, etc.)
- correctly detect openSUSE and SLE in GetOSVersion, and set DISTRO
accordingly
- new is_suse() function to check if running on a SUSE-based distro
- use zypper to install packages
- adapt apache virtual host configuration for openSUSE
- some simple fixes (path to pip, mysql service name)
Change-Id: Id2f7c9e18a1c4a7b7cea262ea7959d183e4b0cf0
diff --git a/lib/cinder b/lib/cinder
index c2cf15b..058fcc2 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -63,11 +63,7 @@
cp -p $CINDER_DIR/etc/cinder/policy.json $CINDER_CONF_DIR
# Set the paths of certain binaries
- if [[ "$os_PACKAGE" = "deb" ]]; then
- CINDER_ROOTWRAP=/usr/local/bin/cinder-rootwrap
- else
- CINDER_ROOTWRAP=/usr/bin/cinder-rootwrap
- fi
+ CINDER_ROOTWRAP=$(get_rootwrap_location cinder)
# If Cinder ships the new rootwrap filters files, deploy them
# (owned by root) and add a parameter to $CINDER_ROOTWRAP