四、内核模块加载的配置:
有时候需要一次性加载许多模块,需要在一个地方统一配置modprobe的选项等,有一个比较重要的文件:/etc/modprobe.conf,在openSUSE中,和它有关的还有modprobe.d/文件夹下的许多文件和modprobe.conf.local文件,在 /etc/modprobe.conf里会include其它所说的文件,一般建议在modprobe.conf.local中修改自己的配置。 /etc/modprobe.conf其实就是用于 写入模块的加载命令或模块的别名的定义等。man modprobe.conf:
alias my-mod really_long_modulename为模块定义一个便于使用的别名
options modulename option...在加载模块时添加选项
install modulename command...使用自己定义的命令去加载指定的模块,如install fred /sbin/modprobe barney; /sbin/modprobe
--ignore-install fred" 每次加载fred模块的时候用的是 “/sbin/modprobe barney; /sbin/modprobe
--ignore-install fred”命令
remove modulename command...用自己定义的命令删除指定的模块。
include filename 引入其它文件
blacklist modulename 不再加载某个模块