Skip to content

Commit 09b378f

Browse files
committed
improve OVAL applicability check for bootc environment
check if /run/ostree-booted exists
1 parent 6daeb3c commit 09b378f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

shared/applicability/oval/bootc.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<criterion comment="kernel is installed" test_ref="bootc_platform_test_kernel_installed" />
66
<criterion comment="rpm-ostree is installed" test_ref="bootc_platform_test_rpm_ostree_installed" />
77
<criterion comment="bootc is installed" test_ref="bootc_platform_test_bootc_installed" />
8+
<criterion comment="/run/ostree-booted exists" test_ref="bootc_platform_test_run_ostree_booted_exists" />
89
<criterion comment="openshift-kubelet is not installed" test_ref="bootc_platform_test_openshift_kubelet_removed" />
910
</criteria>
1011
</definition>
@@ -17,4 +18,13 @@
1718
{{{ oval_test_package_installed(package="rpm-ostree", test_id="bootc_platform_test_rpm_ostree_installed") }}}
1819
{{{ oval_test_package_installed(package="bootc", test_id="bootc_platform_test_bootc_installed") }}}
1920
{{{ oval_test_package_removed(package="openshift-kubelet", test_id="bootc_platform_test_openshift_kubelet_removed") }}}
21+
22+
<unix:file_test id="bootc_platform_test_run_ostree_booted_exists" check="all" check_existence="all_exist" comment="The file /run/ostree-booted exists" version="1">
23+
<unix:object object_ref="bootc_platform_obj_run_ostree_booted_exists" />
24+
</unix:file_test>
25+
26+
<unix:file_object id="bootc_platform_obj_run_ostree_booted_exists" comment="The file /run/ostree-booted exists" version="1">
27+
<unix:filepath operation="equals">/run/ostree-booted</unix:filepath>
28+
</unix:file_object>
29+
2030
</def-group>

0 commit comments

Comments
 (0)