base-files: /lib/functions.sh: ignore errors in insert_modules

Package postinst will pass even names of builtin modules to insert_modules,
leading to postinst failing with error 255. This has been fixed in master
in r5279, but for lede-17.01 this minimal change is preferable.

Fixes FS#645, FS#893.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer
2018-04-17 11:19:20 +02:00
parent b5ba01a0d3
commit efb6ca1896
2 changed files with 2 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ insert_modules() {
if [ -f /etc/modules.d/$m ]; then
sed 's/^[^#]/insmod &/' /etc/modules.d/$m | ash 2>&- || :
else
modprobe $m
modprobe $m || :
fi
done
}