Browse Source

When updating, set PKG variable to dnf or yum at runtime

When updating RHEL7 containers from a RHEL8-based environment, the
update fails with the following messages:

    "stderr": "/tmp/yum_update.sh: line 18: /bin/dnf: No such file or directory",
    "stdout": "No packages were found for update...",

This patch reverts the PKG variable assignment to the way it used to be
so that the decision to use dnf or yum is made at runtime, within the
container.

Change-Id: I6a248b5277efd8707fc744292075949d94e3a05f
changes/92/700192/1
Julie Pichon 2 months ago
parent
commit
8820e9493d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      templates/yum_update.sh.j2

+ 1
- 1
templates/yum_update.sh.j2 View File

@@ -2,7 +2,7 @@

set -eou pipefail

PKG={{ pkg_mgr }}
PKG="$(command -v dnf || command -v yum)"
PKG_MGR="$(echo ${PKG:(-3)})"

if [ $PKG_MGR == "dnf" ]; then


Loading…
Cancel
Save