package/blockmount: simplify extroot module loading logic
[openwrt/svn-archive/archive.git] / include / kernel.mk
index 9e94dce3b9fa021c999fdc4c44c099d6b41b6969..0df0337c493d3df08c69bd886c760ea0bc83471e 100644 (file)
@@ -90,7 +90,8 @@ define ModuleAutoLoad
                done; \
                if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
                        if [ "$$$$$$$$boot" = "1" ]; then \
-                               echo '# May be required for rootfs' >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
+                               mkdir -p $(2)/etc/modules-boot.d; \
+                               ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \
                        fi; \
                        modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \
                fi; \