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 | |
parent | 1598ebd3fb256c753d8dc087388ccaba3732a44e (diff) | |
download | mtk-20170518-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.zip mtk-20170518-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.tar.gz mtk-20170518-5b78b9a5e7f2f9c779a76b6212fa58aec6eaacf7.tar.bz2 |
Check for modules.d existence before loading modules
SVN-Revision: 7423
Diffstat (limited to 'package/base-files')
-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 86ea82d..f757ffa 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() { |