Remove CentOS6 from nodepool scripts

With CentOS6 usage removed, remove special handling for it from nodepool
scripts.

Change-Id: Ife5ec9ade201dcd8f5969087dd2fc88be12dbebd
This commit is contained in:
Andreas Jaeger 2015-12-04 22:11:22 +01:00
parent ca687cd8b4
commit d8170deb07
3 changed files with 3 additions and 51 deletions

View File

@ -50,27 +50,9 @@ echo "$PACKAGES" > $PACKAGESFILE
PACKAGELIST=`/usr/bindep-env/bin/bindep -b -f $PACKAGESFILE || true`
rm $PACKAGESFILE
if grep "^CentOS release 6" /etc/redhat-release ; then
# --downloadonly is provided by the yum-plugin-downloadonly package on
# CentOS 6.x
CENTOS6=1
yum install -y yum-plugin-downloadonly
else
CENTOS6=0
fi
if [ -f /usr/bin/apt-get ] ; then
# --ignore-missing conflicts with set -e, so force it to be ok
apt-get -y --ignore-missing -d install $PACKAGELIST || true
else
if [ $CENTOS6 -eq 1 ] ; then
# some packages may depend on python-setuptools, which is not
# installed and cannot be reinstalled on CentOS 6.x once yum
# has erased them, so use --skip-broken to avoid aborting; also
# on this platform --downloadonly causes yum to return nonzero
# even when it succeeds, so ignore its exit code
yum install -y --downloadonly --skip-broken $PACKAGELIST || true
else
yum install -y --downloadonly $PACKAGELIST
fi
yum install -y --downloadonly $PACKAGELIST
fi

View File

@ -27,31 +27,13 @@ if [[ ${YUM:-yum} == "dnf" ]]; then
exit 0
fi
if grep "^CentOS release 6" /etc/redhat-release ; then
# --downloadonly is provided by the yum-plugin-downloadonly package on
# CentOS 6.x
CENTOS6=1
yum install -y yum-plugin-downloadonly
else
CENTOS6=0
fi
while read line ; do
if [ -f /usr/bin/apt-get ] ; then
# --ignore-missing conflicts with set -e, so force it to be ok
apt-get -y --ignore-missing -d install $line || true
else
if [ $CENTOS6 -eq 1 ] ; then
# some packages may depend on python-setuptools, which is not
# installed and cannot be reinstalled on CentOS 6.x once yum
# has erased them, so use --skip-broken to avoid aborting; also
# on this platform --downloadonly causes yum to return nonzero
# even when it succeeds, so ignore its exit code
yum install -y --downloadonly --skip-broken $line || true
else
yum install -y --downloadonly $line
fi
yum install -y --downloadonly $line
fi
done < /tmp/pkgs-to-install

View File

@ -31,19 +31,7 @@ fi
echo $HOSTNAME > /tmp/image-hostname.txt
sudo mv /tmp/image-hostname.txt /etc/image-hostname.txt
# HP Cloud centos6 images currently require an update to the
# certificates file before they can connect to common services such as
# fedora mirror for EPEL over https
if [ -f /etc/redhat-release ]; then
if grep -q 'CentOS release 6' /etc/redhat-release; then
# chicken-and-egg ... hp cloud image has EPEL installed, but
# we can't connect to it...
# Note 'epel*' will match 0 or more repositories named epel,
# so it will work regardless of whether epel is actually
# installed.
sudo yum --disablerepo=epel* update -y ca-certificates
fi
else
if [ ! -f /etc/redhat-release ]; then
# Cloud provider apt repos break us - so stop using them
LSBDISTID=$(lsb_release -is)
LSBDISTCODENAME=$(lsb_release -cs)