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";
Updated by Benoît PECCATTE 6 months ago
- Status changed from New to In progress
- Assignee changed from Félix DALLIDET to Benoît PECCATTE
Updated by Benoît PECCATTE 6 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-plugins-private/pull/609
Updated by Benoît PECCATTE 6 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-plugins-private:commit:rudder-plugins-private|591102dbbf49fd7689811806ac92dfcd3984e8d1.
Actions