aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index dc3b80534b..72d954db3c 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -154,10 +154,13 @@ config_list_foreach() {
}
insert_modules() {
- [ -d /etc/modules.d ] && {
- cd /etc/modules.d
- sed 's/^[^#]/insmod &/' $* | ash 2>&- || :
- }
+ for m in $*; do
+ if [ -f /etc/modules.d/$m ]; then
+ sed 's/^[^#]/insmod &/' /etc/modules.d/$m | ash 2>&- || :
+ else
+ modprobe $m
+ fi
+ done
}
default_prerm() {