From 5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 31 May 2007 15:58:43 +0000 Subject: Check for modules.d existence before loading modules SVN-Revision: 7423 --- 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 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() { -- cgit v1.2.3