Skip to content

Commit

Permalink
coreos_kernel_options: update entries file path
Browse files Browse the repository at this point in the history
In OCP 4.16 the file where kernel boot options changed.
While before the file was named `ostree-1-rhcos.conf`, now it is named
`ostree-1.conf`.

This change is backwards compatible.
  • Loading branch information
yuumasato committed Jun 17, 2024
1 parent 9acfe41 commit 450ba39
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions shared/templates/coreos_kernel_option/oval.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<criteria operator="AND">
<criteria operator="OR">
<criteria operator="AND">
{{{- oval_file_absent_criterion('/boot/loader/entries/ostree-2-.*.conf')}}}
{{{- oval_argument_value_in_line_criterion('/boot/loader/entries/ostree-1-.*.conf', ARG_NAME, ARG_VALUE, 'Linux kernel', negate=ARG_NEGATE) }}}
{{{- oval_file_absent_criterion('/boot/loader/entries/ostree-2.*.conf')}}}
{{{- oval_argument_value_in_line_criterion('/boot/loader/entries/ostree-1.*.conf', ARG_NAME, ARG_VALUE, 'Linux kernel', negate=ARG_NEGATE) }}}
</criteria>
<criteria operator="AND">
{{{- oval_argument_value_in_line_criterion('/boot/loader/entries/ostree-2-.*.conf', ARG_NAME, ARG_VALUE, 'Linux kernel', negate=ARG_NEGATE) }}}
{{{- oval_argument_value_in_line_criterion('/boot/loader/entries/ostree-2.*.conf', ARG_NAME, ARG_VALUE, 'Linux kernel', negate=ARG_NEGATE) }}}
</criteria>
</criteria>
<criteria operator="AND">
Expand All @@ -27,11 +27,11 @@
</criteria>
</definition>

{{{- oval_file_absent('/boot/loader/entries/ostree-2-.*.conf') }}}
{{{- oval_file_absent('/boot/loader/entries/ostree-2.*.conf') }}}
{{{-
oval_argument_value_in_line_test('/boot/loader/entries/ostree-1-.*.conf', ARG_NAME, ARG_VALUE, 'options ', is_regex=ARG_IS_REGEX) }}}
oval_argument_value_in_line_test('/boot/loader/entries/ostree-1.*.conf', ARG_NAME, ARG_VALUE, 'options ', is_regex=ARG_IS_REGEX) }}}

{{{- oval_argument_value_in_line_test('/boot/loader/entries/ostree-2-.*.conf', ARG_NAME, ARG_VALUE, 'options ', is_regex=ARG_IS_REGEX) }}}
{{{- oval_argument_value_in_line_test('/boot/loader/entries/ostree-2.*.conf', ARG_NAME, ARG_VALUE, 'options ', is_regex=ARG_IS_REGEX) }}}

{{{- oval_argument_value_in_line_test('/proc/cmdline', ARG_NAME, ARG_VALUE, 'BOOT_IMAGE', is_regex=ARG_IS_REGEX) }}}
</def-group>

0 comments on commit 450ba39

Please sign in to comment.