[openwrt/openwrt] base-files: /lib/functions.sh: ignore errors in insert_modules

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 17 02:24:44 PDT 2018


neoraider pushed a commit to openwrt/openwrt.git, branch lede-17.01:
https://git.lede-project.org/efb6ca189641aec64ba94f0d6d4e008fb2c1668b

commit efb6ca189641aec64ba94f0d6d4e008fb2c1668b
Author: Matthias Schiffer <mschiffer at universe-factory.net>
AuthorDate: Tue Apr 17 11:19:20 2018 +0200

    base-files: /lib/functions.sh: ignore errors in insert_modules
    
    Package postinst will pass even names of builtin modules to insert_modules,
    leading to postinst failing with error 255. This has been fixed in master
    in r5279, but for lede-17.01 this minimal change is preferable.
    
    Fixes FS#645, FS#893.
    
    Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 package/base-files/Makefile               | 2 +-
 package/base-files/files/lib/functions.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 40963d5..1d034fd 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=173.5
+PKG_RELEASE:=173.6
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index bea5f0f..c69feb3 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -158,7 +158,7 @@ insert_modules() {
 		if [ -f /etc/modules.d/$m ]; then
 			sed 's/^[^#]/insmod &/' /etc/modules.d/$m | ash 2>&- || :
 		else
-			modprobe $m
+			modprobe $m || :
 		fi
 	done
 }



More information about the lede-commits mailing list