summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-05-31 15:58:43 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-05-31 15:58:43 +0000
commitc13b2a5d979d5c35737a0d0ed847b9ed5b0dcc27 (patch)
treef6f0cec28d95d2763eacf84fdb0c2202dfaa847f /package
parent4d3c75a4bfc8ce68573de726ce25a98f070f16c8 (diff)
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')
-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 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() {