From 06f87da37b43c455357487ac3c1580d9ac93d3cb Mon Sep 17 00:00:00 2001 From: Elvir Kuric Date: Sat, 21 Nov 2015 13:06:27 +0100 Subject: [PATCH] mkimage-yum.sh to support dnf included changes @tianon proposed in #17362 Signed-off-by: Elvir Kuric Upstream-commit: 5c329633d7ce7adfa390e70b91c3e87c5d05ef93 Component: engine --- components/engine/contrib/mkimage-yum.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/engine/contrib/mkimage-yum.sh b/components/engine/contrib/mkimage-yum.sh index 25852b62d0..b764588363 100755 --- a/components/engine/contrib/mkimage-yum.sh +++ b/components/engine/contrib/mkimage-yum.sh @@ -11,13 +11,17 @@ usage() { $(basename $0) [OPTIONS] OPTIONS: -y The path to the yum config to install packages from. The - default is /etc/yum.conf. + default is /etc/yum.conf for Centos/RHEL and /etc/dnf/dnf.conf for Fedora EOOPTS exit 1 } # option defaults yum_config=/etc/yum.conf +if [ -f /etc/dnf/dnf.conf ] && command -v dnf &> /dev/null; then + yum_config=/etc/dnf/dnf.conf + alias yum=dnf +fi while getopts ":y:h" opt; do case $opt in y)