http://bluedata.org/2008/06/14/centos_rhel-auto-load-modules/

CentOS4(RHEL4) 的 /etc/rc.sysinit 文件中有这样一段:

# Loadmodules(forbackwardcompatibilitywithVARs)if[ -f /etc/rc.modules]; then        /etc/rc.modulesfi

所以,可以创建 /etc/rc.modules 文件来加载模块。如: vi /etc/rc.modules

#!/bin/sh # # Thisscriptwillbeloadotheruser-definedmodules.modprobesoftdog

chmod +x /etc/rc.modules

而在 CentOS5(RHEL5) 的 /etc/rc.sysinit 文件的上述一段之前还有一段:

# Load other user-defined modulesforfilein /etc/sysconfig/modules/*.modules ; do   [ -x $file ] && $file done

可以参照 /etc/sysconfig/modules 目录下的 udev-stw.modules 创建一个以xxxx .modules 结尾的可执行文件来加载模块。

所以在/etc/sysconfig/modules 目录下新建一个名为xxx.modules 的文件,并且赋值权限为755即可。

 

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-08-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-06
  • 2021-09-03
  • 2022-12-23
  • 2022-02-20
  • 2022-03-01
相关资源
相似解决方案