summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-28 10:58:43 -0400
committerTom Gundersen <teg@jklm.no>2012-05-29 12:48:18 +0200
commit4826ad0747f9caa8e685f819102e71845905a6a1 (patch)
treed049d30a51e99114793e5ff368413c12fde958ea /functions
parent9882b6ac728255b9e17c042b3c0d57cddd0d60d8 (diff)
add support for modules-load.d directories
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions19
1 files changed, 16 insertions, 3 deletions
diff --git a/functions b/functions
index 99bc43b..8105a5e 100644
--- a/functions
+++ b/functions
@@ -344,6 +344,20 @@ kill_all() {
fi
}
+load_modules() {
+ local rc=0
+
+ /usr/lib/systemd/systemd-load-modules
+ rc=$?
+
+ if (( ${#MODULES[*]} )); then
+ modprobe -ab "${MODULES[@]}"
+ (( rc += $? ))
+ fi
+
+ return $rc
+}
+
# Start/trigger UDev, load MODULES and settle UDev
udevd_modprobe() {
# $1 = where we are being called from.
@@ -357,9 +371,8 @@ udevd_modprobe() {
udevadm trigger --action=add --type=devices
stat_done
- # Load modules from the MODULES array defined in rc.conf
- (( ${#MODULES[*]} )) &&
- status -v "Loading User-specified Modules" modprobe -ab "${MODULES[@]}"
+ # Load modules from the MODULES array and modules-load.d
+ status -v "Loading User-specified Modules" load_modules
status "Waiting for UDev uevents to be processed" \
udevadm settle