Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kernel_module_disabled template for Ubuntu #11294

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared/templates/kernel_module_disabled/oval.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id="kernel_module_{{{ KERNMODULE }}}_disabled" version="1">
{{{ oval_metadata("The kernel module " + KERNMODULE + " should be disabled.") }}}
<criteria operator="OR">
{{% if product in ["rhcos4", "sle12", "sle15"] or 'ol' in product or 'rhel' in product %}}
{{% if product in ["rhcos4", "sle12", "sle15"] or 'ol' in product or 'rhel' in product or 'ubuntu' in product %}}
<criteria operator="AND">
<criterion test_ref="test_kernmod_{{{ KERNMODULE }}}_blacklisted"
comment="kernel module {{{ KERNMODULE }}} blacklisted in modprobe.d" />
Expand Down Expand Up @@ -44,7 +44,7 @@
<value>/usr/lib/modules-load.d</value>
</constant_variable>

{{% if product in ["rhcos4", "sle12", "sle15"] or 'ol' in product or 'rhel' in product %}}
{{% if product in ["rhcos4", "sle12", "sle15"] or 'ol' in product or 'rhel' in product or 'ubuntu' in product %}}
<ind:textfilecontent54_test id="test_kernmod_{{{ KERNMODULE }}}_blacklisted" version="1" check="all"
comment="kernel module {{{ KERNMODULE }}} blacklisted">
<ind:object object_ref="obj_kernmod_{{{ KERNMODULE }}}_blacklisted" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "install {{{ KERNMODULE }}} /bin/true" > /etc/modprobe.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "install {{{ KERNMODULE }}} /bin/true" > /etc/modules-load.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /etc/modules-load.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ if [[ ! -d /run/modprobe.d ]]; then
mkdir -p /run/modprobe.d
fi
echo "install {{{ KERNMODULE }}} /bin/true" > /run/modprobe.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /run/modprobe.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ if [[ ! -d /run/modules-load.d ]]; then
fi

echo "install {{{ KERNMODULE }}} /bin/true" > /run/modules-load.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /run/modules-load.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "install {{{ KERNMODULE }}} /bin/true" > /usr/lib/modprobe.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /usr/lib/modprobe.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "install {{{ KERNMODULE }}} /bin/true" > /usr/lib/modules-load.d/{{{ KERNMODULE }}}.conf
{{% if "ol" in product or 'rhel' in product %}}
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
echo "blacklist {{{ KERNMODULE }}}" >> /usr/lib/modules-load.d/{{{ KERNMODULE }}}.conf
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_rhel,multi_platform_ol
# platform = multi_platform_rhel,multi_platform_ol,multi_platform_ubuntu

echo > /etc/modprobe.d/{{{ KERNMODULE }}}.conf
echo "install {{{ KERNMODULE }}} /bin/true" > /etc/modprobe.d/{{{ KERNMODULE }}}.conf
Loading