Re: Load kernel module automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2002-06-05 at 13:41, Michael Zhu wrote:
> Hi, I couldn't find the /etc/modules file in my Linux
> machine. There is only a modules.conf file under /etc
> directory. My Linux is RedHat 7.2 with kernel version
> 2.4.7-10. What is wrong with this?
> 
> Michael
> 
> 

None of the RedHat 7.2 machines around here have this file either.
However, after grepping for "modules" in /etc/rc.sysinit, I find this:

# Load modules (for backward compatibility with VARs)
if [ -f /etc/rc.modules ]; then
        /etc/rc.modules
fi

This file doesn't exist on my machine either, and from the other
descriptions in this thread, this is probably not the /etc/modules file
the others are talking about. 

I'm guessing you could create /etc/rc.modules yourself, something
like[1]:

#!/bin/bash
if [ ! -f /etc/modules ]; then
	exit 0
fi

for mod in $(cat /etc/modules); do
	insmod $mod
done

Then create /etc/modules as discussed in previous posts.

[1] This script is untested! Use with caution :-)

-- 
Trevor Hamm

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux