Many kernel modules are loaded automatically at boot time, as /sbin/lsmod shows. You can specify other modules to be loaded at boot time by creating a file in the /etc/sysconfig/modules/ directory. You can use any name you like for the file that you create, but you must give it a .modules extension, and you must make it executable by running the following command:
modules]# chmod 755
No Need to Load Network and SCSI Modules
Networking and SCSI modules do not generally need to be manually loaded as they have their own particular loading mechanisms.
Here is a complete sample script named bluez-uinput.modules that loads the uinput module:
The first line of any .modules file should be a shebang line that gives the location of the bash shell interpreter:
#!/bin/shLike many configuration files, all .modules files are bash scripts. The if-conditional on line 3 tests to make sure that the /dev/input/uinput files does not exist (the ! symbol negates the condition), and, if that is the case, then executes/sbin/modprobe with the name of the kernel module to load—uinput in this example. The remainder of the line simply redirects any output so that the modprobe command is quiet
阅读(1960) | 评论(0) | 转发(0) |