~ubuntu-core-dev/module-init-tools/ubuntu

« back to all changes in this revision

Viewing changes to doc/modprobe.conf.sgml

  • Committer: Scott James Remnant
  • Date: 2009-07-16 15:24:17 UTC
  • mfrom: (152.1.38)
  • Revision ID: scott@netsplit.com-20090716152417-7ak1sklxb59cs4fz
MergeĀ 3.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    <manvolnum>5</manvolnum>
28
28
  </refmeta>
29
29
  <refnamediv>
30
 
    <refname>modprobe.conf</refname><refname>modprobe.d</refname> <refpurpose>Configuration file/directory for modprobe</refpurpose>
 
30
    <refname>modprobe.d</refname><refname>modprobe.conf</refname> <refpurpose>Configuration directory/file for modprobe</refpurpose>
31
31
  </refnamediv>
32
32
  <refsect1>
33
33
    <title>DESCRIPTION</title>
34
34
 
35
35
    <para>Because the <command>modprobe</command> command can add or
36
 
      remove extra more than one module, due to module dependencies,
 
36
      remove more than one module, due to module dependencies,
37
37
      we need a method of specifying what options are to be used with
38
 
      those modules.  <filename>/etc/modprobe.conf</filename> (or, if that does not exist, all files under the <filename>/etc/modprobe.d</filename> directory) specifies
39
 
      those options, as required.  It can also be used to create
40
 
      convenient aliases: alternate names for a module.  Finally, it
41
 
      can override the normal <command>modprobe</command> behavior
42
 
      altogether, for those with very special requirements (such as
43
 
      inserting more than one module).
 
38
      those modules.  All files underneath the 
 
39
      <filename>/etc/modprobe.d</filename> directory which end with the
 
40
      <filename>.conf</filename> extension specify those options as
 
41
      required. (the <filename>/etc/modprobe.conf</filename> file can
 
42
      also be used if it exists, but that will be removed in a future 
 
43
      version).  They can also be used to create convenient aliases: 
 
44
      alternate names for a module, or they can override the normal 
 
45
      <command>modprobe</command> behavior altogether for those with 
 
46
      special requirements (such as inserting more than one module).
44
47
    </para>
45
48
    <para>
46
49
      Note that module and alias names (like other module names) can
48
51
      module commands.
49
52
    </para>
50
53
    <para>
51
 
      The format of <filename>modprobe.conf</filename> and files under <filename>modprobe.d</filename> is simple: one
52
 
      command per line, with blank lines and lines starting with #
53
 
      ignored (useful for adding comments).  A \ at the end of a line
 
54
      The format of and files under <filename>modprobe.d</filename> and
 
55
      <filename>/etc/modprobe.conf</filename> is simple: one
 
56
      command per line, with blank lines and lines starting with '#'
 
57
      ignored (useful for adding comments).  A '\' at the end of a line
54
58
      causes it to continue on the next line, which makes the file a
55
59
      bit neater.
56
60
    </para>
57
 
    <para>
58
 
      The syntax is a simplification of <filename>modules.conf</filename>, used in 2.4 kernels and earlier.
59
 
    </para>
60
61
  </refsect1>
61
62
  <refsect1>
62
63
    <title>COMMANDS</title>
95
96
            <replaceable>modulename</replaceable> (which might be an
96
97
            alias) every time it is inserted into the kernel: whether
97
98
            directly (using <command>modprobe</command> 
98
 
            <replaceable>modulename</replaceable>, or because the
 
99
            <replaceable>modulename</replaceable> or because the
99
100
            module being inserted depends on this module.
100
101
          </para>
101
102
          <para>
110
111
        </term>
111
112
        <listitem>
112
113
          <para>
113
 
            This is the most powerful primitive in
114
 
            <filename>modprobe.conf</filename>: it tells
 
114
            This is the most powerful primitive: it tells
115
115
            <command>modprobe</command> to run your command instead of
116
116
            inserting the module in the kernel as normal.  The command
117
117
            can be any shell command: this allows you to do any kind
118
118
            of complex processing you might wish.  For example, if the
119
 
            module "fred" worked better with the module "barney"
120
 
            already installed (but it didn't depend on it, so
 
119
            module "fred" works better with the module "barney"
 
120
            already installed (but it doesn't depend on it, so
121
121
            <command>modprobe</command> won't automatically load it),
122
122
            you could say "install fred /sbin/modprobe barney;
123
123
            /sbin/modprobe --ignore-install fred", which would do what
124
124
            you wanted.  Note the <option>--ignore-install</option>,
125
125
            which stops the second <command>modprobe</command> from
126
 
            re-running the same <command>install</command> command.
 
126
            running the same <command>install</command> command again.
127
127
            See also <command>remove</command> below.
128
128
          </para>
129
129
          <para>
130
130
            You can also use <command>install</command> to make up
131
131
            modules which don't otherwise exist.  For example:
132
132
            "install probe-ethernet /sbin/modprobe e100 ||
133
 
            /sbin/modprobe eepro100", which will try first the e100
134
 
            driver, then the eepro100 driver, when you do "modprobe
 
133
            /sbin/modprobe eepro100", which will first try to load the e100
 
134
            driver, and if it fails, then the eepro100 driver when you do "modprobe
135
135
            probe-ethernet".
136
136
          </para>
137
137
          <para>
161
161
        </listitem>
162
162
      </varlistentry>
163
163
      <varlistentry>
164
 
        <term>include <replaceable>filename</replaceable>
165
 
        </term>
166
 
        <listitem>
167
 
          <para>
168
 
            Using this command, you can include other configuration
169
 
            files, or whole directories, which is occasionally useful.  Note that aliases in
170
 
            the included file will override aliases previously
171
 
            declared in the current file.
172
 
          </para>
173
 
        </listitem>
174
 
      </varlistentry>
175
 
      <varlistentry>
176
164
        <term>blacklist <replaceable>modulename</replaceable>
177
165
        </term>
178
166
        <listitem>
191
179
    </variablelist>
192
180
  </refsect1>
193
181
  <refsect1>
194
 
    <title>Backwards Compatibility</title>
195
 
 
196
 
    <para>
197
 
      There is a <command>generate_modprobe.conf</command> program
198
 
      which should do a reasonable job of generating
199
 
      <filename>modprobe.conf</filename> from old (2.4 or 2.2)
200
 
      module setups.
201
 
    </para>
202
 
    <para>
203
 
      Although the syntax is similar to the older
204
 
      <filename>/etc/modules.conf</filename>, there are many features
205
 
      missing.  There are two reasons for this: firstly, install and
206
 
      remove commands can do just about anything, and secondly, the
207
 
      module-init-tools modprobe is designed to be simple enough that
208
 
      it can be easily replaced.
209
 
    </para>
210
 
    <para>
211
 
      With the complexity of actual module insertion reduced to three
212
 
      system calls (open, read, init_module), and the
213
 
      <filename>modules.dep</filename> file being simple and open,
214
 
      producing a more powerful modprobe variant can be done
215
 
      independently if there is a need.
216
 
    </para>
217
 
  </refsect1>
218
 
  <refsect1>
219
182
    <title>COPYRIGHT</title>
220
183
    <para>
221
184
      This manual page Copyright 2004, Rusty Russell, IBM Corporation.