From c13b2a5d979d5c35737a0d0ed847b9ed5b0dcc27 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 31 May 2007 15:58:43 +0000 Subject: [PATCH] Check for modules.d existence before loading modules git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7423 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index 86ea82de6..f757ffaf2 100755 --- a/package/base-files/files/etc/functions.sh +++ b/package/base-files/files/etc/functions.sh @@ -141,8 +141,10 @@ config_foreach() { } load_modules() { - cd /etc/modules.d - sed 's/^[^#]/insmod &/' $* | ash 2>&- || : + [ -d /etc/modules.d ] && { + cd /etc/modules.d + sed 's/^[^#]/insmod &/' $* | ash 2>&- || : + } } include() { -- 2.20.1