Merge "Look for all qemu-img/kvm package names in rhel-based distros"
This commit is contained in:
commit
dfef65e0f2
|
@ -258,7 +258,7 @@ if [ "$platform" = 'NAME="Ubuntu"' ]; then
|
|||
elif [ "$platform" = 'NAME=Fedora' ]; then
|
||||
PKG_LIST="qemu kpartx git"
|
||||
for pkg in $PKG_LIST; do
|
||||
if ! yum list installed $pkg &> /dev/null; then
|
||||
if ! yum info installed $pkg &> /dev/null; then
|
||||
echo "Required package " $pkg " is not installed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -267,16 +267,16 @@ else
|
|||
# centos or rhel
|
||||
PKG_LIST="qemu-kvm qemu-img"
|
||||
for pkg in $PKG_LIST; do
|
||||
if ! yum list installed $pkg &> /dev/null; then
|
||||
if ! yum list installed $pkg"-ev" &> /dev/null; then
|
||||
echo "Required package " $pkg " or " $pkg"-ev" " is not installed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
# Actual name may be qemu-img, qemu-img-ev, qemu-img-rhev, ...
|
||||
# "yum install qemu-img" works for all, but search requires wildcard
|
||||
if ! yum info installed ${pkg}* &> /dev/null; then
|
||||
echo "Required package " $pkg " is not installed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
PKG_LIST="kpartx git"
|
||||
for pkg in $PKG_LIST; do
|
||||
if ! yum list installed $pkg &> /dev/null; then
|
||||
if ! yum info installed $pkg &> /dev/null; then
|
||||
echo "Required package " $pkg " is not installed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -285,7 +285,7 @@ else
|
|||
if [ ${platform:0:6} = "CentOS" ]; then
|
||||
# install EPEL repo, in order to install argparse
|
||||
PKG_LIST="python-argparse"
|
||||
if ! yum list installed $pkg &> /dev/null; then
|
||||
if ! yum info installed $pkg &> /dev/null; then
|
||||
echo "CentOS requires the python-argparse package be "
|
||||
echo "installed separately from the EPEL repo."
|
||||
echo "Required package " $pkg " is not installed. Exiting."
|
||||
|
|
Loading…
Reference in New Issue