From ae9eb1997b9d5e8cb777ec7400b978b10f22c823 Mon Sep 17 00:00:00 2001 From: rchikov Date: Tue, 27 Jun 2023 13:43:20 +0200 Subject: [PATCH] Implementation of the recommended changes --- shared/templates/sysctl/bash.template | 2 +- shared/templates/sysctl/oval.template | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shared/templates/sysctl/bash.template b/shared/templates/sysctl/bash.template index 46b1ed6319b..21e52c369d7 100644 --- a/shared/templates/sysctl/bash.template +++ b/shared/templates/sysctl/bash.template @@ -6,7 +6,7 @@ # Comment out any occurrences of {{{ SYSCTLVAR }}} from /etc/sysctl.d/*.conf files {{% if product in [ "sle12", "sle15"] %}} -for f in /run/sysctl.d/*.conf /etc/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf; do +for f in /run/sysctl.d/*.conf /etc/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf; do {{% elif product not in [ "ol7", "ol8", "ol9", "rhcos4", "rhel7", "rhel8", "rhel9"] %}} for f in /etc/sysctl.d/*.conf /run/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf; do {{% else %}} diff --git a/shared/templates/sysctl/oval.template b/shared/templates/sysctl/oval.template index d68b467b504..d57f154e7c5 100644 --- a/shared/templates/sysctl/oval.template +++ b/shared/templates/sysctl/oval.template @@ -174,8 +174,14 @@ variable to have no value even when there are valid objects. --> - object_static_etc_sysctls_{{{ rule_id }}} + object_static_etc_lib_sysctls_{{{ rule_id }}} object_static_run_usr_local_sysctls_{{{ rule_id }}} + + + + + + object_static_etc_sysctls_{{{ rule_id }}} {{% if product not in [ "ol7", "ol8", "ol9", "rhcos4", "rhel7", "rhel8", "rhel9"] %}} object_static_lib_sysctld_{{{ rule_id }}} {{% endif %}}