IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope: Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  Linux  >

附录A /etc/modules.conf文件

developerWorks

返回原文..

		
	由此文件可以设置modprobe的行为,此文件中的行可能包含下列格式:
  [add] above module module_list
  alias alias_name result
  [add] below module module_list
  define VARIABLE WORD
  depfile=A_PATH
  else
  elseif EXPRESSION
  endif
  if EXPRESSION
  include PATH_TO_CONFIG_FILE
  insmod_opt=GENERIC_OPTIONS_TO_INSMOD
  install module command ...
  keep
  [add] options module MODULE_SPECIFIC_OPTIONS
  path=A_PATH
  path[TAG]=A_PATH
  pcimapfile=A_PATH
  [add] probe name module_list
  [add] probeall name module_list
  post-install module command ...
  post-remove module command ...
  pre-install module command ...
  pre-remove module command ...
  remove module command ...
 
        此文件中的命令支持shell原字符,例如,下面的第一句使用?作为通配符,第二句使用``执行shell命令:
path[misc]=/lib/modules/1.1.5?/local
path[net]=/lib/modules/`uname -r`/net
命令可以重复多次,在使用[add]作为命令前缀时,新的模块列表会被加入系统,而非替换以前的模块声明。
 
l       语法声明
define VARIABLE WORD
将VARIABLE=WORD加入环境变量中。
depfile=A_PATH
depmod创建的依赖性文件的路径,modprobe用于查找模块和其依赖模块。
if EXPRESSION,else,elseif EXPRESSION,endif
条件语句
include PATH_TO_CONFIG_FILE
包含配置文件,主要用于一个配置文件支持多个平台时
insmod_opt=GENERIC_OPTIONS_TO_INSMOD
指定insmod命令的通用选项
path=A_PATH 
path[TAG]=A_PATH
A_PATH指定查找模块的附加路径。[TAG]在modprobe使用自动化参数时,可以使用更多的信息。[TAG]省略时,表示指定为[misc]。
pcimapfile=A_PATH
depmod创建的pcimap文件的路径,并由此模块的安装脚本使用。
isapnpmapfile=A_PATH
depmod创建的isapnpmap文件的路径,以支持ISA PNP设备。
usbmapfile=A_PATH
depmod创建的usbmap文件的路径,以支持USB设备。
parportmapfile=A_PATH
depmod创建的parportmap文件的路径,以支持并行设备。
alias alias_name result
创建模块result的别名alias_name
例如,
alias iso9660 isofs
        使得系统可以使用modprobe iso9660加载模块。
        alias some_module off
设置modprobe忽略加在此模块的请求
alias some_module null
设置对some_module的请求总是成功,但是实际上并不加载模块
        
        [add] probe name module_list 
[add] probeall name module_list
在modprobe请求装载名为name的模块时,module_list中的模块会被尝试。probe是尝试直到第一个模块插入成功,probeall会尝试所有的模块。
[add] options [-k] module [MODULE_SPECIFIC_OPTIONS]
指定在module加载时的模块参数
下列指令只用于使用命令加载或卸载模块时。
pre-install module command
在安装指定的模块之前执行命令command
install module command
安装指定的模块执行命令command而不执行insmod
post-install module command
在安装指定的模块之后执行命令command
pre-remove module command
在卸除指定的模块之前执行命令command
remove module command
卸除指定的模块执行命令command而不执行rmmod
post-remove module command
在卸除指定的模块之后执行命令command
 
		
	   
	   

返回原文.

    关于 IBM 隐私条约 联系 IBM 使用条款