package: fix insmod on install
authorJohn Crispin <john@openwrt.org>
Sat, 22 Jun 2013 22:09:40 +0000 (22:09 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 22 Jun 2013 22:09:40 +0000 (22:09 +0000)
the procd changes broke the postinst insmod.

Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37015

include/kernel.mk
package/base-files/files/lib/functions.sh

index b637de5918339ba52c8544487f33c4fcb92d92ed..cbf342a0d2b7244bfa535913bba9fc25755f5009 100644 (file)
@@ -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
index 42d76fd67dbf8e58c796fdb125201781e096ac5c..bc521b07ee0c906ac5fc4ebff0e20a2efbcf76af 100755 (executable)
@@ -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