summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-22 22:09:40 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-22 22:09:40 +0000
commitbb153c196b6efc883021b9a91d8c65770203e29a (patch)
tree3b2f8d6125b9eb2d40301af6408bc29ca4c3c47e
parent04fc1eb30e482bef5448518e2ca4f0abfb45bc30 (diff)
package: fix insmod on install
the procd changes broke the postinst insmod. Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37015 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/kernel.mk2
-rwxr-xr-xpackage/base-files/files/lib/functions.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index b637de5918..cbf342a0d2 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -105,7 +105,7 @@ define ModuleAutoLoad
echo "#!/bin/sh" > $(2)/CONTROL/postinst; \
echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL/postinst; \
echo ". /lib/functions.sh" >> $(2)/CONTROL/postinst; \
- echo "load_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst; \
+ echo "insert_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst; \
chmod 0755 $(2)/CONTROL/postinst; \
fi
endef
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 42d76fd67d..bc521b07ee 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -203,6 +203,13 @@ config_list_foreach() {
done
}
+insert_modules() {
+ [ -d /etc/modules.d ] && {
+ cd /etc/modules.d
+ sed 's/^[^#]/insmod &/' $* | ash 2>&- || :
+ }
+}
+
include() {
local file