Users might see
"modprobe: FATAL: Module xyz not found in directory"
The output from modprobe is semantically wrong in this case and
confuses users. Keep the warning for debugging purposes, but reduce
the severeness.
It now reads "Module xyz not found in directory"
Reference: bsc#
1169997
return 0
}
+nonfatal_modprobe()
+{
+ modprobe $1 2>&1 > /dev/stdout |
+ while read -r line || [ -n "$line" ]; do
+ echo "${line#modprobe: FATAL: }" >&2
+ done
+}
+
fips_load_crypto()
{
FIPSMODULES=$(cat /etc/fipsmodules)
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
for _module in $FIPSMODULES; do
if [ "$_module" != "tcrypt" ]; then
- if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then
+ if ! nonfatal_modprobe "${_module}" 2>/tmp/fips.modprobe_err; then
# check if kernel provides generic algo
_found=0
while read _k _s _v || [ -n "$_k" ]; do