]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- plain modprobe the module
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 26 Nov 2007 20:08:47 +0000 (20:08 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 26 Nov 2007 20:08:47 +0000 (20:08 +0000)
- skip loading rc-scripts functions if they appear to be loaded already

svn-id: @9099

rc.d/rc.modules

index 81a97794a2f945184e2c70f5dcf222cc25170ea5..33ded84dee0e5057589b5b4b652abc55ebff25fe 100755 (executable)
@@ -6,7 +6,10 @@
 # rc.modules: launch modules specified in /etc/modules
 # $Id$
 
-. /etc/rc.d/init.d/functions
+# if invoked directly, source functions library
+if [[ "$0" != *rc.modules ]]; then
+       . /etc/rc.d/init.d/functions
+fi
 
 {
        read _x _y v _z
        [ -f "/etc/modules.${kerneleq}" ] && egrep -v "^(#|[[:blank:]]*#)" "/etc/modules.${kerneleq}" 2>/dev/null; \
        echo \
 ) | # make sure there is a LF at the end
-while read module args
-do
+while read module args; do
        [ -z "$module" ] && continue
-       _modprobe single $module
+       modprobe -s $module
 done
 
 # This must be last line !
This page took 0.032625 seconds and 4 git commands to generate.