From e94ae35be91ecbce711bcf72a940c23e3c3d8db6 Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 7 Aug 2018 10:02:43 -0500 Subject: Handle yum and dnf Signed-off-by: baude Closes: #1227 Approved by: rhatdan --- test/test_podman_baseline.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/test_podman_baseline.sh b/test/test_podman_baseline.sh index 72999c5d9..a9ade8c7b 100755 --- a/test/test_podman_baseline.sh +++ b/test/test_podman_baseline.sh @@ -36,6 +36,13 @@ then set -eu fi +pkg_manager=`command -v dnf` +if [ -z "$pkg_manager" ]; then + pkg_manager=`command -v yum` +fi + +echo "Package manager binary: $pkg_manager" + ######## # Next two commands should return blanks ######## @@ -145,7 +152,7 @@ then ######## # Install Docker, but not for long! ######## - dnf -y install docker + $package_manager -y install docker fi systemctl restart docker @@ -164,7 +171,7 @@ then ######## # Time to remove Docker ######## - dnf -y remove docker + $package_manager -y remove docker fi ######## -- cgit v1.2.3-54-g00ecf