Skip to content

Commit 0a246a5

Browse files
committed
support rpm platforms with dnf only
observed the latest rockylinux 9 containers do not have a yum symlink to dnf anymore.
1 parent 34d623a commit 0a246a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tasks/install_shell.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,11 @@ install_file() {
554554
fi
555555

556556
rpm -Uvh --oldpackage --replacepkgs "$2"
557+
exists dnf && PKGCMD=dnf || PKGCMD=yum
557558
if test "$version" = 'latest'; then
558-
run_cmd "yum install -y puppet-agent && yum upgrade -y puppet-agent"
559+
run_cmd "${PKGCMD} install -y puppet-agent && ${PKGCMD} upgrade -y puppet-agent"
559560
else
560-
run_cmd "yum install -y 'puppet-agent-${puppet_agent_version}'"
561+
run_cmd "${PKGCMD} install -y 'puppet-agent-${puppet_agent_version}'"
561562
fi
562563
;;
563564
"noarch.rpm")

0 commit comments

Comments
 (0)