summaryrefslogtreecommitdiff
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-08-23 22:27:32 +0200
committerJo-Philipp Wich <jo@mein.io>2017-11-07 12:02:06 +0100
commit2b6facc8d4b33c04ae0b544933d1489adf347bfc (patch)
treed722eff8b5b58a3805d3c1c8a903ea29a06fcc1a /package/base-files/files/lib
parent05a4200d56efe439e298c8af3d82ac221b0e86e9 (diff)
downloadmtk-20170518-2b6facc8d4b33c04ae0b544933d1489adf347bfc.zip
mtk-20170518-2b6facc8d4b33c04ae0b544933d1489adf347bfc.tar.gz
mtk-20170518-2b6facc8d4b33c04ae0b544933d1489adf347bfc.tar.bz2
include: kernel.mk: simplify module autoloading
Let the generic postinstall script invoke "kmodloader" when the just installed package contains any /etc/module.d/ entries. This allows us to skip the explicit "insert_module()" calls in the package postinstall. Due to the removed insert_module calls we do not need to assemble a complete list of modules per package anymore, which allows for vast simplification of the package generation code. While we're at it, also support specifying default parameters for modules using either the MODPARAM or MODPARAM.modulename variables in KernelPackage. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 81ef84b..c3988b9 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -235,6 +235,10 @@ default_postinst() {
rm -fR $root/rootfs-overlay/
fi
+ if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then
+ kmodloader
+ fi
+
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
. /lib/functions/system.sh
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci