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=5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7;p=openwrt%2Fstaging%2Fansuel.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() {