LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-09-2003, 10:58 PM   #1
pnb
LQ Newbie
 
Registered: Aug 2000
Location: Rural AlaskA
Posts: 2

Rep: Reputation: 0
Question How to test between 2 kernels in /etc/modules.conf


Hello:

I've got a redhat 8.0 box with two kernels, the first is the stock Redhat 2.4.18-14 kernel and the second is my new 2.4.18-14alsa kernel. While I usually use the alsa kernel there are times I use the stock/ oss kernel.

What I would like to know is how to use the: "if EXPRESSION" and other commands in the /etc/modules.conf file so that modprobe loads oss modules for the redhat kernel and alsa modules for the alsa kernel. Something like:

if "uname -r" = 2.4.18-14 then
(load oss modules)
else
(load alsa modules)

Make sence? My knowledge of bash/ modules.conf programing is poor and while I'm tinkering away at it I thought I'd ask this user forum.

Thank you for any help.
pnb
 
Old 11-10-2003, 02:27 AM   #2
FearPasion710
Member
 
Registered: Jul 2003
Distribution: Gaytoo...
Posts: 96

Rep: Reputation: 15
Question Why?

Im sorry for being uninformed but why?

why do u need oss when you already have alsa!! dosent alsa take care of all that?

Or better yet Get the 2.6-TEST# kernel compile it and voila you got alsa built into the kernel!! and IS FaST AS HELL TOO!!
 
Old 11-10-2003, 04:29 PM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I'm using this

[root@zeus root]# cat /etc/rc.d/rc.modules
#!/bin/sh
if [ ! `uname -r` = 2.6.0-test9 ]; then
modprobe -s usb-ohci
modprobe -s omnibook
modprobe -s ospm_ac_adapter
modprobe -s ospm_battery
modprobe -s ospm_button
else
modprobe trident
modprobe softdog
modprobe natsemi
modprobe radeon
modprobe ohci-hcd
modprobe hid
modprobe ac
modprobe battery
modprobe button
modprobe fan
modprobe processor
modprobe thermal
modprobe ati-agp
modprobe ali-agp
modprobe cpufreq_userspace
modprobe cpufreq_powersave
modprobe freq_table
modprobe proc_intf
modprobe psmouse
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conf.modules Vs Modules.conf Issue, lost eth0 initialization LinuxFreebie41 Linux - General 3 11-04-2004 06:02 AM
Update-modules: No longer managing /lib/modules/modprobe.conf? geekzen Debian 0 04-03-2004 06:49 PM
/etc/conf.modules is more recent than /lib/module/2.2.15-4mdk/modules.dep Derek-kun Linux - Newbie 3 09-26-2003 02:56 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM


All times are GMT -5. The time now is 02:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration