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:
parent
ca687cd8b4
commit
d8170deb07
@ -50,27 +50,9 @@ echo "$PACKAGES" > $PACKAGESFILE
|
|||||||
PACKAGELIST=`/usr/bindep-env/bin/bindep -b -f $PACKAGESFILE || true`
|
PACKAGELIST=`/usr/bindep-env/bin/bindep -b -f $PACKAGESFILE || true`
|
||||||
rm $PACKAGESFILE
|
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
|
if [ -f /usr/bin/apt-get ] ; then
|
||||||
# --ignore-missing conflicts with set -e, so force it to be ok
|
# --ignore-missing conflicts with set -e, so force it to be ok
|
||||||
apt-get -y --ignore-missing -d install $PACKAGELIST || true
|
apt-get -y --ignore-missing -d install $PACKAGELIST || true
|
||||||
else
|
else
|
||||||
if [ $CENTOS6 -eq 1 ] ; then
|
yum install -y --downloadonly $PACKAGELIST
|
||||||
# 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
|
|
||||||
fi
|
fi
|
||||||
|
@ -27,31 +27,13 @@ if [[ ${YUM:-yum} == "dnf" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
while read line ; do
|
||||||
|
|
||||||
if [ -f /usr/bin/apt-get ] ; then
|
if [ -f /usr/bin/apt-get ] ; then
|
||||||
# --ignore-missing conflicts with set -e, so force it to be ok
|
# --ignore-missing conflicts with set -e, so force it to be ok
|
||||||
apt-get -y --ignore-missing -d install $line || true
|
apt-get -y --ignore-missing -d install $line || true
|
||||||
else
|
else
|
||||||
if [ $CENTOS6 -eq 1 ] ; then
|
yum install -y --downloadonly $line
|
||||||
# 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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done < /tmp/pkgs-to-install
|
done < /tmp/pkgs-to-install
|
||||||
|
@ -31,19 +31,7 @@ fi
|
|||||||
echo $HOSTNAME > /tmp/image-hostname.txt
|
echo $HOSTNAME > /tmp/image-hostname.txt
|
||||||
sudo mv /tmp/image-hostname.txt /etc/image-hostname.txt
|
sudo mv /tmp/image-hostname.txt /etc/image-hostname.txt
|
||||||
|
|
||||||
# HP Cloud centos6 images currently require an update to the
|
if [ ! -f /etc/redhat-release ]; then
|
||||||
# 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
|
|
||||||
# Cloud provider apt repos break us - so stop using them
|
# Cloud provider apt repos break us - so stop using them
|
||||||
LSBDISTID=$(lsb_release -is)
|
LSBDISTID=$(lsb_release -is)
|
||||||
LSBDISTCODENAME=$(lsb_release -cs)
|
LSBDISTCODENAME=$(lsb_release -cs)
|
||||||
|
Loading…
Reference in New Issue
Block a user