/etc/rc.modules for 2.4 and 2.6

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

 



I little known fact is the "official" way to get a kernel module to load
at boot time on Red Hat Linux. The "official" way is not the rc.local
file.

The "official" way is to create an executable script /etc/rc.modules.

I've updated mine to account for the fact that right now sometimes I
boot into a 2.4 kernel and sometimes into a 2.6 kernel.

Here is my /etc/rc.modules. Hopefully this can be helpful for other
people as well.

#!/bin/bash

[ -f /etc/sysconfig/modules ] && . /etc/sysconfig/modules

# See if we are running 2.4 or 2.6 kernel
uname -r | grep -q ^2.6

if [ $? -ne 0 ]; then
 
	# We are running 2.4 kernel

	MODULES="ecc i8k ipsec ipsec_aes ipsec_sha1 ipsec_md5 ip_nat_ftp ip_nat_irc"

	for i in ${MODULES}; do
		/sbin/modprobe $i
	done

else

	# We are running a 2.6 kernel
	
	MODULES="i8k ip_nat_ftp ip_nat_irc aes md5 sha1 des deflate psmouse"
		
	for i in ${MODULES}; do
		/sbin/modprobe $i
	done

fi

exit 0


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux