infra-package-needs: fix haveged install for all CentOS releases

We've never really tested any of this on RHEL, so remove that match
(also, rhel7 element is deprecated for the version-less rhel element).

The CentOS elements export $YUM to be either dnf/yum as appropriate,
so use that behind the distro check where it will be defined.

Change-Id: I3dc18b2f7b6a624719a5f8d7d8b888c69fc0ac2b
This commit is contained in:
Ian Wienand 2019-10-09 02:42:51 +00:00
parent 8138f1d843
commit ed153e9e70

View File

@ -20,6 +20,7 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
fi
set -e
if [[ "$DISTRO_NAME" =~ (centos|rhel7) ]] ; then
yum -y install --enablerepo=epel haveged
if [[ "$DISTRO_NAME" == centos ]] ; then
# Note: $YUM exposed by centos environment, correct across releases
${YUM} -y install --enablerepo=epel haveged
fi