From d70b1c55b67b44b98c23ceed25bc428481f7e00a Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 23 Oct 2018 16:47:37 -0500 Subject: [PATCH] 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 }