diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-05-31 15:58:43 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-05-31 15:58:43 +0000 |
commit | 5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7 (patch) | |
tree | 09bf2d5141c95be9b894350ce5d27360712361fd /package/base-files/files/etc/functions.sh | |
parent | 1598ebd3fb256c753d8dc087388ccaba3732a44e (diff) | |
download | upstream-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/etc/functions.sh')
-rwxr-xr-x | package/base-files/files/etc/functions.sh | 6 |
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() { |