Skip to content

Commit db6b635

Browse files
committed
Changed policy to determine semanage package name
so that we don't have to maintain it each time we add a new version of a platform. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent d2f1fa5 commit db6b635

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

cfe_internal/enterprise/federation/federation.cf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,17 @@ bundle agent semanage_installed
245245
warn or fix based.";
246246
debian_6|debian_7|debian_8|ubuntu_12|ubuntu_14|ubuntu_16|rhel_5::
247247
"semanage_package" string => "policycoreutils";
248-
debian_9|debian_10|ubuntu_18|redhat_8|centos_8|redhat_9|rocky_9|redhat_10|rocky_10::
249-
"semanage_package" string => "policycoreutils-python-utils";
250248
redhat_6|centos_6|redhat_7|centos_7::
251249
"semanage_package" string => "policycoreutils-python";
250+
any::
251+
"semanage_package"
252+
string => "policycoreutils-python-utils",
253+
if => or(
254+
and("debian", isgreaterthan("$(sys.os_version_major)", "8")),
255+
and("ubuntu", isgreaterthan("$(sys.os_version_major)", "16")),
256+
and("redhat|centos", isgreaterthan("$(sys.os_version_major)", "7")),
257+
and("redhat|rocky", isgreaterthan("$(sys.os_version_major)", "8"))
258+
);
252259

253260
packages:
254261
debian|ubuntu::

0 commit comments

Comments
 (0)