aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/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
commit5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7 (patch)
tree09bf2d5141c95be9b894350ce5d27360712361fd /package/base-files/files
parent1598ebd3fb256c753d8dc087388ccaba3732a44e (diff)
downloadupstream-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.tar.gz
upstream-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.tar.bz2
upstream-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.zip
Check for modules.d existence before loading modules
SVN-Revision: 7423
Diffstat (limited to 'package/base-files/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() {