From: Florian Fainelli Date: Thu, 31 May 2007 15:58:43 +0000 (+0000) Subject: Check for modules.d existence before loading modules X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3abb294912e762b546a68af34b67276fec90e100;p=openwrt%2Fsvn-archive%2Farchive.git Check for modules.d existence before loading modules SVN-Revision: 7423 --- diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index 86ea82de67..f757ffaf26 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() {