1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
7 D.5. /etc/rc.d/init.d/modules
9 <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
10 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
11 <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
12 "text/css" media="print" />
14 <body class="lfs" id="lfs-6.8">
15 <div class="navheader">
17 Linux From Scratch - Version 6.8
20 付録 D. ブートスクリプトと sysconfig スクリプト version-20100627
24 <a accesskey="p" href="apds04.html" title=
25 "/etc/rc.d/init.d/consolelog">前のページ</a>
27 /etc/rc.d/init.d/consolelog
31 <a accesskey="n" href="apds06.html" title=
32 "/etc/rc.d/init.d/udev">次のページ</a>
38 <a accesskey="u" href="scripts.html" title=
39 "付録 D. ブートスクリプトと sysconfig スクリプト version-20100627">上に戻る</a>
42 <a accesskey="h" href="../index.html" title=
43 "Linux From Scratch - Version 6.8">ホーム</a>
47 <div class="wrap" lang="ja" xml:lang="ja">
49 <a id="modules" name="modules"></a>D.5. /etc/rc.d/init.d/modules
53 ########################################################################
54 # Begin $rc_base/init.d/modules
56 # Description : Module auto-loading script
58 # Authors : Zack Winkles
64 ########################################################################
69 # Assure that the kernel has module support.
70 [ -e /proc/ksyms -o -e /proc/modules ] || exit 0
75 # Exit if there's no modules file or there are no
77 [ -r /etc/sysconfig/modules ] &&
78 egrep -qv '^($|#)' /etc/sysconfig/modules ||
81 boot_mesg -n "Loading modules:" ${INFO}
83 # Only try to load modules if the user has actually given us
84 # some modules to load.
85 while read module args; do
87 # Ignore comments and blank lines.
92 # Attempt to load the module, making
93 # sure to pass any arguments provided.
94 modprobe ${module} ${args} >/dev/null
96 # Print the module name if successful,
97 # otherwise take note.
99 boot_mesg -n " ${module}" ${NORMAL}
101 failedmod="${failedmod} ${module}"
103 done < /etc/sysconfig/modules
105 boot_mesg "" ${NORMAL}
106 # Print a message about successfully loaded
107 # modules on the correct line.
110 # Print a failure message with a list of any
111 # modules that may have failed to load.
112 if [ -n "${failedmod}" ]; then
113 boot_mesg "Failed to load modules:${failedmod}" ${FAILURE}
118 echo "Usage: ${0} {start}"
123 # End $rc_base/init.d/modules
126 <div class="navfooter">
129 <a accesskey="p" href="apds04.html" title=
130 "/etc/rc.d/init.d/consolelog">前のページ</a>
132 /etc/rc.d/init.d/consolelog
136 <a accesskey="n" href="apds06.html" title=
137 "/etc/rc.d/init.d/udev">次のページ</a>
139 /etc/rc.d/init.d/udev
143 <a accesskey="u" href="scripts.html" title=
144 "付録 D. ブートスクリプトと sysconfig スクリプト version-20100627">上に戻る</a>
147 <a accesskey="h" href="../index.html" title=
148 "Linux From Scratch - Version 6.8">ホーム</a>