Skip to content

Commit

Permalink
Merge pull request #12988 from jan-cerny/change_conditions
Browse files Browse the repository at this point in the history
OPENSCAP-5220 Change macro bash_bootc_build
  • Loading branch information
matusmarhefka authored Feb 12, 2025
2 parents 7fb2776 + 9c4e7c0 commit 697fa03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/macros/10-bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2669,15 +2669,15 @@ This macro defines a conditional expression that is evaluated as true
if the remediation is performed during a build of a bootable container image.
#}}
{{%- macro bash_bootc_build() -%}}
[[ "$OSCAP_BOOTC_BUILD" == "YES" ]]
{ rpm --quiet -q kernel rpm-ostree bootc && ! rpm --quiet -q openshift-kubelet && { [ -f "/run/.containerenv" ] || [ -f "/.containerenv" ]; }; }
{{%- endmacro -%}}

{{#
This macro defines a conditional expression that is evaluated as true
if the remediation is not performed during a build of a bootable container image.
#}}
{{%- macro bash_not_bootc_build() -%}}
[[ "$OSCAP_BOOTC_BUILD" != "YES" ]]
! {{{ bash_bootc_build() }}}
{{%- endmacro -%}}


Expand Down

0 comments on commit 697fa03

Please sign in to comment.