/[baselayout]/trunk/init.d/modules
Gentoo

Contents of /trunk/init.d/modules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 266 - (show annotations) (download)
Mon Nov 18 13:07:02 2002 UTC (17 years ago) by azarah
File size: 1173 byte(s)
change license

1 #!/sbin/runscript
2 # Copyright 1999-2002 Gentoo Technologies, Inc.
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
6
7 depend() {
8 need checkroot hostname
9 }
10
11 start() {
12 # Should not fail if kernel do not have module
13 # support compiled in ...
14 [ -f /proc/modules ] || return 0
15
16 # Here we should fail, as a modular kernel do need
17 # depmod command ...
18 if [ ! -x /sbin/depmod ]
19 then
20 eerror "ERROR: system is missing /sbin/depmod !"
21 return 1
22 fi
23
24 ebegin "Calculating module dependencies"
25 /sbin/update-modules &>/dev/null
26 eend $? "Failed to calculate dependencies"
27
28 # Loop over every line in /etc/modules.autoload.
29 (cat /etc/modules.autoload; echo) | # make sure there is a LF at the end
30 while read module args
31 do
32 case "${module}" in
33 \#*|"") continue ;;
34 esac
35 ebegin " Loading module ${module}"
36 modprobe ${module} ${args} &>/dev/null
37 eend $? " Failed to load ${module}"
38 done
39 echo
40
41 #
42 # Just in case a sysadmin prefers generic symbolic links in
43 # /lib/modules/boot for boot time modules we will load these modules
44 #
45 if [ -n "$(modprobe -l -t boot)" ]
46 then
47 modprobe -a -t boot \* &>/dev/null
48 fi
49 }
50
51
52 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20