浏览代码

package: fix insmod on install

the procd changes broke the postinst insmod.

Signed-off-by: John Crispin <[email protected]>

SVN-Revision: 37015
John Crispin 12 年之前
父节点
当前提交
43a3d87b83
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 1 1
      include/kernel.mk
  2. 7 0
      package/base-files/files/lib/functions.sh

+ 1 - 1
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

+ 7 - 0
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