mkimage-yum.sh to support dnf

included changes @tianon proposed in #17362

Signed-off-by: Elvir Kuric <elvirkuric@gmail.com>
This commit is contained in:
Elvir Kuric 2015-11-21 13:06:27 +01:00
parent afe6c1f30c
commit 5c329633d7

View file

@ -11,13 +11,17 @@ usage() {
$(basename $0) [OPTIONS] <name>
OPTIONS:
-y <yumconf> 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)