aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-12-18 01:13:48 +0000
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-12-17 19:21:13 -0600
commitabe552b969b6601f47ba0474f683d8cd80d53c9d (patch)
tree30f82c4df2bbc8fba53654c2c9ee866abe56b592
parentsh/init.sh.Linux.in: skip /proc test if no md5sum (diff)
downloadopenrc-abe552b969b6601f47ba0474f683d8cd80d53c9d.zip
openrc-abe552b969b6601f47ba0474f683d8cd80d53c9d.tar.gz
openrc-abe552b969b6601f47ba0474f683d8cd80d53c9d.tar.bz2
modules: get rid of printing each module on Linux
Now that we respect the module blacklists, don't print every module we try to load, because it might not end up loaded due to the blacklist, and modprobe doesn't consider that a failure.
-rw-r--r--init.d/modules.in12
1 files changed, 5 insertions, 7 deletions
diff --git a/init.d/modules.in b/init.d/modules.in
index 3431c4a..2eab77f 100644
--- a/init.d/modules.in
+++ b/init.d/modules.in
@@ -31,7 +31,7 @@ FreeBSD_modules()
Linux_modules()
{
- # Should not fail if kernel do not have module
+ # Should not fail if kernel does not have module
# support compiled in ...
[ ! -f /proc/modules ] && return 0
@@ -48,22 +48,21 @@ Linux_modules()
x=${x%.*}
done
- local list= x= xx= y= args= mpargs= cnt=0 a=
+ local list= x= xx= y= args= mpargs= a=
for x in $kv_variant_list ; do
eval list=\$modules_$(shell_var "$x")
[ -n "$list" ] && break
done
[ -z "$list" ] && list=$modules
+ [ -n "$list" ] && ebegin "Loading kernel modules"
for x in $list; do
a=${x#*:}
if [ "$a" = "$x" ]; then
unset mpargs
- ebegin "Loading module $x"
else
x=${x%%:*}
mpargs="-o $a"
- ebegin "Loading module $x as $a"
fi
aa=$(shell_var "$a")
xx=$(shell_var "$x")
@@ -75,10 +74,9 @@ Linux_modules()
done
[ -z "$args" ] && eval args=\$module_${aa}_args
[ -z "$args" ] && eval args=\$module_${xx}_args
- eval modprobe --use-blacklist -q "$mpargs" "$x" "$args"
- eend $? "Failed to load $x" && : $(( cnt += 1 ))
+ eval modprobe --use-blacklist --verbose "$mpargs" "$x" "$args"
done
- einfo "Autoloaded $cnt module(s)"
+ [ -n "$list" ] && eend
}
start()