aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-05-31 15:58:43 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-05-31 15:58:43 +0000
commit124e99d13b4740b3965caf688de0973e912d9877 (patch)
treef6f0cec28d95d2763eacf84fdb0c2202dfaa847f /package/base-files
parent1631a50ce8ce0010e7f3b8573f8fb1385098c24b (diff)
downloadupstream-124e99d13b4740b3965caf688de0973e912d9877.tar.gz
upstream-124e99d13b4740b3965caf688de0973e912d9877.tar.bz2
upstream-124e99d13b4740b3965caf688de0973e912d9877.zip
Check for modules.d existence before loading modules
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7423 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/functions.sh6
1 files 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() {