diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-05-28 10:58:43 -0400 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-05-29 12:48:18 +0200 |
commit | 4826ad0747f9caa8e685f819102e71845905a6a1 (patch) | |
tree | d049d30a51e99114793e5ff368413c12fde958ea /functions | |
parent | 9882b6ac728255b9e17c042b3c0d57cddd0d60d8 (diff) |
add support for modules-load.d directories
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -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 |