Add $YUM to pickup dnf on Fedora>=22
dnf is a drop-in replacement for yum on Fedora>=22; add $YUM so we use dnf there and avoid the deprecation warnings. Change-Id: I3d62d8f6d8705b2cf840b63ffd82927a408d75aa
This commit is contained in:
parent
eba109c764
commit
2f2350e78a
@ -42,6 +42,13 @@ function is_opensuse {
|
||||
cat /etc/os-release | grep -q -e "openSUSE"
|
||||
}
|
||||
|
||||
# dnf is a drop-in replacement for yum on Fedora>=22
|
||||
YUM=yum
|
||||
if is_fedora && [[ $(lsb_release -rs) -ge 22 ]]; then
|
||||
YUM=dnf
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Distro specific puppet installs
|
||||
#
|
||||
@ -51,16 +58,17 @@ function _systemd_update {
|
||||
# services due to selinux errors after upgrade. A work-around is
|
||||
# to install the latest version of selinux and systemd here and
|
||||
# restart the daemon for good measure after it is upgraded.
|
||||
yum install -y selinux-policy
|
||||
yum install -y systemd
|
||||
$YUM install -y selinux-policy
|
||||
$YUM install -y systemd
|
||||
systemctl daemon-reload
|
||||
}
|
||||
|
||||
function setup_puppet_fedora {
|
||||
_systemd_update
|
||||
yum update -y
|
||||
|
||||
# NOTE: we preinstall lsb_release to ensure facter sets
|
||||
$YUM update -y
|
||||
|
||||
# NOTE: we preinstall lsb_release here to ensure facter sets
|
||||
# lsbdistcodename
|
||||
#
|
||||
# Fedora declares some global hardening flags, which distutils
|
||||
@ -70,7 +78,7 @@ function setup_puppet_fedora {
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1217376) and can be
|
||||
# removed when that is sorted out.
|
||||
|
||||
yum install -y redhat-lsb-core git puppet \
|
||||
$YUM install -y redhat-lsb-core git puppet \
|
||||
redhat-rpm-config
|
||||
|
||||
mkdir -p /etc/puppet/modules/
|
||||
|
Loading…
Reference in New Issue
Block a user