Skip to content

Commit 6880db4

Browse files
authored
Merge pull request #11508 from marcusburghardt/kernel_module_false
Additional updates in kernel_module_disabled template
2 parents 0df6b38 + d1f9131 commit 6880db4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

shared/templates/kernel_module_disabled/bash.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if LC_ALL=C grep -q -m 1 "^install {{{ KERNMODULE }}}" /etc/modprobe.d/{{{ KERNM
77
{{% if '#' in KERNMODULE %}}
88
{{{ raise("KERNMODULE (" + KERNMODULE + ") uses sed path separator (#) in " + rule_id) }}}
99
{{% endif %}}
10-
sed -i 's#^install {{{ KERNMODULE }}}.*#install {{{ KERNMODULE }}} /bin/true#g' /etc/modprobe.d/{{{ KERNMODULE }}}.conf
10+
sed -i 's#^install {{{ KERNMODULE }}}.*#install {{{ KERNMODULE }}} /bin/false#g' /etc/modprobe.d/{{{ KERNMODULE }}}.conf
1111
else
1212
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
1313
echo "install {{{ KERNMODULE }}} /bin/false" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf

shared/templates/kernel_module_disabled/kubernetes.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
storage:
1414
files:
1515
- contents:
16-
source: data:,install%20{{{ KERNMODULE | urlencode }}}%20/bin/true%0Ablacklist%20{{{ KERNMODULE | urlencode }}}%0A
16+
source: data:,install%20{{{ KERNMODULE | urlencode }}}%20/bin/false%0Ablacklist%20{{{ KERNMODULE | urlencode }}}%0A
1717
mode: 0644
1818
path: /etc/modprobe.d/{{{ KERNMODULE }}}.conf
1919
overwrite: true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
echo "install {{{ KERNMODULE }}} /bin/true" > /etc/modprobe.d/{{{ KERNMODULE }}}.conf
3+
echo "install {{{ KERNMODULE }}} /bin/false" > /etc/modprobe.d/{{{ KERNMODULE }}}.conf
44
{{% if "ol" in product or 'rhel' in product or 'ubuntu' in product %}}
55
echo "blacklist {{{ KERNMODULE }}}" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
66
{{% endif %}}

0 commit comments

Comments
 (0)