<def-group>
  <definition class="compliance" id="banner_etc_motd" version="2">
    {{{ oval_metadata("The system motd banner text should be set correctly.") }}}
    <criteria operator="OR">
      <criterion comment="/etc/motd is absent" test_ref="test_banner_etc_motd_exists" negate="true"/>
      <criterion comment="/etc/motd is set appropriately" test_ref="test_banner_etc_motd" />
    </criteria>
  </definition>

  <unix:file_test version="1" id="test_banner_etc_motd_exists" check="all" check_existence="all_exist" comment="/etc/motd exists">
      <unix:object object_ref="object_banner_etc_motd_exists" />
  </unix:file_test>

  <unix:file_object version="1" id="object_banner_etc_motd_exists">
      <unix:filepath>/etc/motd</unix:filepath>
  </unix:file_object>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="correct banner in /etc/motd" id="test_banner_etc_motd" version="1">
    <ind:object object_ref="object_banner_etc_motd" />
    <ind:state state_ref="state_banner_etc_motd" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_banner_etc_motd" version="1">
    <ind:behaviors singleline="true" multiline="false" />
    <ind:filepath>/etc/motd</ind:filepath>
    <ind:pattern operation="pattern match">^(.*)$</ind:pattern>
    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_banner_etc_motd" version="1">
    <ind:subexpression datatype="string" var_ref="motd_banner_text" operation="pattern match" />
  </ind:textfilecontent54_state>

  <external_variable comment="warning banner text variable" datatype="string" id="motd_banner_text" version="1" />

</def-group>
