Victoria Martinez de la Cruz 375ddd1e9e Add support for CentOS
This change aims to add the foundations for CentOS support
on manila-image-elements.

In this patch-set, the following has been modified

- Added elements for manila-centos-minimal
- Added elements for centos-nfs
- Added elements for centos-cifs
- Renamed all elements for the different protocols to distro-protocol
to facilitate automation
- Modified the main script to take the distro param

Follow-up patches will add centos-based elements
for all other protocols supported.

Change-Id: Ie1469a8b3973b9a15c3fa27688df3b7e7e8da688
Partial-Bug: #1675538
2017-03-28 16:21:10 +00:00

16 lines
459 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
# Only set the mirror for the Base, Extras and Updates repositories
# The others arn't enabled and do not exist on all mirrors
sed -e "s|^#baseurl=http://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo