From 85d7b9406d4e0d1baa2f832f848608b04f873a71 Mon Sep 17 00:00:00 2001 From: Daniel Aleksandersen Date: Mon, 16 Nov 2015 23:37:17 +0100 Subject: [PATCH] Test dnf before yum yum may still be installed (by default in recent Fedoras) and will display a deprecation and migration message. On the other hand, dnf either is or isn't installed and the test will proceed as intended. (dnf is the modern replacement for yum.) --- bootstrap/_rpm_common.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootstrap/_rpm_common.sh b/bootstrap/_rpm_common.sh index 9f670da6e..e4219d06b 100755 --- a/bootstrap/_rpm_common.sh +++ b/bootstrap/_rpm_common.sh @@ -4,12 +4,13 @@ # - Fedora 22 (x64) # - Centos 7 (x64: on AWS EC2 t2.micro, DigitalOcean droplet) -if type yum 2>/dev/null -then - tool=yum -elif type dnf 2>/dev/null +if type dnf 2>/dev/null then tool=dnf +elif type yum 2>/dev/null +then + tool=yum + else echo "Neither yum nor dnf found. Aborting bootstrap!" exit 1