summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2005-12-11 20:12:24 +0000
committerRob Landley2005-12-11 20:12:24 +0000
commit9c32a152202a63368b1bfc357f7736b0aafdd0ad (patch)
tree9af379dabf69ff09c68c6441ce66436b284cebf2
parent82327f4be4db075bd84fc6a2b2203e6cb1859a78 (diff)
downloadbusybox-9c32a152202a63368b1bfc357f7736b0aafdd0ad.zip
busybox-9c32a152202a63368b1bfc357f7736b0aafdd0ad.tar.gz
Yann E. Morin's update to modprobe usage.
-rw-r--r--include/usage.h64
1 files changed, 60 insertions, 4 deletions
diff --git a/include/usage.h b/include/usage.h
index 2cfd2b0..e595bd9 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1951,18 +1951,74 @@
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
#define modprobe_trivial_usage \
- "[-knqrsv] [MODULE ...]"
+ "[-knqrsv] MODULE [symbol=value ...]"
#define modprobe_full_usage \
- "Used for high level module loading and unloading.\n\n" \
"Options:\n" \
"\t-k\tMake module autoclean-able\n" \
"\t-n\tJust show what would be done\n" \
"\t-q\tQuiet output\n" \
"\t-r\tRemove module (stacks) or do autoclean\n" \
"\t-s\tReport via syslog instead of stderr\n" \
- "\t-v\tVerbose output"
+ "\t-v\tVerbose output\n\n"
+#define modprobe_notes_usage \
+"modprobe can (un)load a stack of modules, passing each module options (when\n" \
+"loading). modprobe uses a configuration file to determine what option(s) to\n" \
+"pass each module it loads.\n" \
+"\n" \
+"The configuration file is searched (in order) amongst:\n" \
+"\n" \
+" /etc/modprobe.conf (2.6 only)\n" \
+" /etc/modules.conf\n" \
+" /etc/conf.modules (deprecated)\n" \
+"\n" \
+"They all have the same syntax (see below). If none is present, it is\n" \
+"_not_ an error; each loaded module is then expected to load without\n" \
+"options. Once a file is found, the others are tested for.\n" \
+"\n" \
+"/etc/modules.conf entry format:\n" \
+"\n" \
+" alias <alias_name> <mod_name>\n" \
+" Makes it possible to modprobe alias_name, when there is no such module.\n" \
+" It makes sense if your mod_name is long, or you want a more reprenstative\n" \
+" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
+" This makes it also possible to use a different set of options (below) for\n" \
+" the module and the alias.\n" \
+" A module can be aliased more than once.\n" \
+"\n" \
+" options <mod_name|alias_name> <symbol=value ...>\n" \
+" When loading module mod_name (or the module aliased by alias_name), pass\n" \
+" the \"symbol=value\" pairs as option to that module.\n" \
+"\n" \
+"Sample /etc/modules.conf file:\n" \
+"\n" \
+" options tulip irq=3\n" \
+" alias tulip tulip2\n" \
+" options tulip2 irq=4 io=0x308\n" \
+"\n" \
+"Other functionality offered by 'classic' modprobe is not available in\n" \
+"this implementation.\n" \
+"\n" \
+"If module options are present both in the config file, and on the command line,\n" \
+"then the options from the command line will be passed to the module _after_\n" \
+"the options from the config file. That way, you can have defaults in the config\n" \
+"file, and override them for a specific usage from the command line.\n"
#define modprobe_example_usage \
- "$ modprobe cdrom\n"
+ "(with the above /etc/modules.conf):\n\n" \
+ "$ modprobe tulip\n" \
+ " will load the module 'tulip' with default option 'irq=3'\n\n" \
+ "$ modprobe tulip irq=5\n" \
+ " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
+ "$ modprobe tulip2\n" \
+ " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
+ " which are the default for alias 'tulip2'\n\n" \
+ "$ modprobe tulip2 irq=8\n" \
+ " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
+ " which are the default for alias 'tulip2' overriden by the option 'irq=8'\n\n" \
+ " from the command line\n\n" \
+ "$ modprobe tulip2 irq=2 io=0x210\n" \
+ " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
+ " which are the default for alias 'tulip2' overriden by the options 'irq=2 io=0x210'\n\n" \
+ " from the command line\n"
#define more_trivial_usage \
"[FILE ...]"