<def-group>
  <definition class="compliance" id="{{{ _RULE_ID }}}" version="2">
    <metadata>
      <title>Ensure that BLS-compatible boot loader is configured to run Linux operating system with argument {{{ ARG_NAME_VALUE }}}</title>
      {{{- oval_affected(products) }}}
      <description>Ensure {{{ ARG_NAME_VALUE }}} option is configured in the 'options' line in /boot/loader/entries/*.conf.</description>
    </metadata>
    <criteria operator="AND">
        <criterion test_ref="test_bls_{{{ SANITIZED_ARG_NAME }}}_options"
        comment="Check if {{{ ARG_NAME_VALUE }}} is present in the 'options' line in /boot/loader/entries/*" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test id="test_bls_{{{ SANITIZED_ARG_NAME }}}_options"
  comment="check for kernel option {{{ ARG_NAME_VALUE }}} for all snippets in /boot/loader/entries"
  check="all" check_existence="all_exist" version="1">
    <ind:object object_ref="object_bls_{{{ SANITIZED_ARG_NAME }}}_options" />
    <ind:state state_ref="state_bls_{{{ SANITIZED_ARG_NAME }}}_option" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_bls_{{{ SANITIZED_ARG_NAME }}}_options"
  version="1">
    <ind:filepath operation="pattern match">^/boot/loader/entries/.*\.conf$</ind:filepath>
    <ind:pattern operation="pattern match">^options (.*)$</ind:pattern>
    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_bls_{{{ SANITIZED_ARG_NAME }}}_option"
  version="1">
    <ind:subexpression datatype="string" operation="pattern match">^(?:.*\s)?{{{ ESCAPED_ARG_NAME_VALUE }}}(?:\s.*)?$</ind:subexpression>
  </ind:textfilecontent54_state>
</def-group>
