From 91ce15afd13af0f04a13bfb401f184cc481b97aa Mon Sep 17 00:00:00 2001 From: Lon Hohberger Date: Wed, 7 Oct 2020 07:23:14 -0400 Subject: [PATCH] Fix runtime error if DIB_DNF_MODULE_STREAMS is not set Initial patch for I78d7bcf214a45245e2073428120fcbdd968e1acd works without the envvar set, however, 'set -eu' causes it to break if unset. This makes the module configuration variable not required to be set, consistent with other DIB scripts. Change-Id: I5ca80f518d0371a18c107c061dc923876463af57 Signed-off-by: Lon Hohberger --- .../elements/rhel-common/pre-install.d/01-module-configuration | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration b/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration index 0d29557f5..b498e4780 100755 --- a/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration +++ b/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration @@ -14,6 +14,8 @@ fi set -eu set -o pipefail +export DIB_DNF_MODULE_STREAMS=${DIB_DNF_MODULE_STREAMS:-} + if [ "${YUM}" == "dnf" ]; then for m in ${DIB_DNF_MODULE_STREAMS}; do ${YUM} -y module disable ${m/:*/}