diff options
Diffstat (limited to 'main/openrc/modules.initd')
-rw-r--r-- | main/openrc/modules.initd | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/main/openrc/modules.initd b/main/openrc/modules.initd index 7c85eec9aa..a9829f4bc5 100644 --- a/main/openrc/modules.initd +++ b/main/openrc/modules.initd @@ -8,16 +8,21 @@ depend() keyword -openvz -prefix -vserver -lxc } - start() { - if [ -f /etc/modules ] ; then - ebegin "Loading modules" - sed 's/\#.*//g' < /etc/modules | - while read module args - do + ebegin "Loading modules" + for f in /etc/modules \ + /etc/modules-load.d/*.conf \ + /run/modules-load.d/*.conf \ + /usr/lib/modules-load.d/*.conf \ + /lib/modules-load.d/*.conf; do + if ! [ -f "$f" ]; then + continue + fi + + sed 's/\#.*//g' < "$f" | while read module args; do modprobe -q $module $args done - eend $? - fi + done + eend $? } |