aboutsummaryrefslogtreecommitdiff
path: root/init.d/modules.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-10-23 16:47:37 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-10-23 16:47:37 -0500
commitd70b1c55b67b44b98c23ceed25bc428481f7e00a (patch)
tree4700b61346845abe5080daad48fdfb5f752151e0 /init.d/modules.in
parentc1e582586d398b4452f568240985247294f645ef (diff)
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
Diffstat (limited to 'init.d/modules.in')
-rw-r--r--init.d/modules.in5
1 files 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
}