Actions
Bug #24376
openScript to check if module is disabled is_kernel_module_disabled.sh fails if module needs 2 .ko
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No
Description
on an ubuntu20, installing cramfs needs mtd.ko and cramfs.ko
modprobe -n -v cramfs insmod /lib/modules/5.4.0-107-generic/kernel/drivers/mtd/mtd.ko insmod /lib/modules/5.4.0-107-generic/kernel/fs/cramfs/cramfs.ko
so our script is_kernel_module_disabled.sh fails on it, as it expects only one entry
echo "${dry_run}" | grep -Pq -- '^\h*install \/bin\/(true|false)'
CIS does that by filtering to get only the ko matching the module name
[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"
and then it does the grep
grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable";
Actions