commit:     d70b1c55b67b44b98c23ceed25bc428481f7e00a
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Oct 23 21:47:37 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 23 21:47:37 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d70b1c55

modules: Add --first-time switch to modprobe commands

On Linux, kernel modules should be loaded once during boot, either in an
initramfs or by this service.

This does not change anything other than printing out messages if a
module is loaded more than once.

X-Gentoo-Bug: 659530
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=659530

 init.d/modules.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/init.d/modules.in b/init.d/modules.in
index 998972ba..abaab85b 100644
--- a/init.d/modules.in
+++ b/init.d/modules.in
@@ -56,11 +56,12 @@ load_modules()
                ebegin "Loading module $x"
                case "$RC_UNAME" in
                        FreeBSD) kldload "$x"; rc=$? ;;
-                       Linux) modprobe --use-blacklist -q "$x"; rc=$? ;;
+                       Linux) modprobe --first-time -q --use-blacklist "$x"; 
rc=$? ;;
                        *) ;;
                esac
                eend $rc "Failed to load $x"
        done
+       return 0
 }
 
 modules_load_d()
@@ -118,7 +119,7 @@ Linux_modules()
                        [ -n "${args}" ] && break
                done
                [ -z "$args" ] && eval args=\$module_${xx}_args
-               eval modprobe --use-blacklist --verbose "$x" "$args"
+               eval modprobe --first-time --use-blacklist --verbose "$x" 
"$args"
        done
        [ -n "$list" ] && eend
 }

Reply via email to