You are not logged in.

#1 2008-09-21 10:23:11

kordusit
Member
Registered: 2008-09-21
Posts: 4

More rc.conf for different kernel

Hi, It is possible to have different rc.conf for different kernel? I have compiled my custom kernel with real time and it needs a different configuration regarding demons and modules. But I use it only when working with audio so I don't want to remove the standard kernel.

Offline

#2 2008-09-21 21:43:03

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: More rc.conf for different kernel

http://wiki.archlinux.org/index.php/Adding_Runlevels for the runlevels.

What do you mean by different modules?

Offline

#3 2008-09-21 21:52:06

kordusit
Member
Registered: 2008-09-21
Posts: 4

Re: More rc.conf for different kernel

carlocci wrote:

http://wiki.archlinux.org/index.php/Adding_Runlevels for the runlevels.

What do you mean by different modules?

I mean, for example, that with the rt kernel I don't want the "acpi-cpufreq" module to be loaded but I want it with the standard kernel.

Offline

#4 2008-09-21 23:37:50

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: More rc.conf for different kernel

Well, since rc.conf is just bash, if you gave your custom kernel a different release name to the default one you could use a construct like:

if [ $(uname -r) == "2.6.26-ARCH" ]; then 
  MODULES=(acpi-cpufreq plus whatever standard modules you use)
else
  MODULES=(just your standard modules)
fi

It a little bit hack-ish but if you only want to change which modules/daemons are run depending on the kernel it should work fine.

Last edited by ghostHack (2008-09-21 23:38:06)

Offline

#5 2008-09-22 12:15:32

kordusit
Member
Registered: 2008-09-21
Posts: 4

Re: More rc.conf for different kernel

ghostHack wrote:

Well, since rc.conf is just bash, if you gave your custom kernel a different release name to the default one you could use a construct like:

if [ $(uname -r) == "2.6.26-ARCH" ]; then 
  MODULES=(acpi-cpufreq plus whatever standard modules you use)
else
  MODULES=(just your standard modules)
fi

It a little bit hack-ish but if you only want to change which modules/daemons are run depending on the kernel it should work fine.

Great! I'll try it smile

Offline

#6 2008-09-22 12:53:36

attila
Member
Registered: 2006-11-14
Posts: 293

Re: More rc.conf for different kernel

@kordusit This works with "rc.local" and the rc.local.shutdown too. Feel free to experiment with it. smile

@ghostHack Be you sure with this "==" because "man test" say "STRING1 = STRING2"? I have only one "=" in my rc.local and it works.

Offline

#7 2008-09-22 17:26:04

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: More rc.conf for different kernel

@attila, it was late when I posted however

man bash wrote:

string1 == string2
              True if the strings are equal.  = may be used in place of == for strict POSIX compliance.

so the '==' should work but the '=' is probably more correct.

Offline

#8 2008-09-23 07:21:56

attila
Member
Registered: 2006-11-14
Posts: 293

Re: More rc.conf for different kernel

ghostHack wrote:

so the '==' should work but the '=' is probably more correct.

Nice to know and thanks for the hint because "man bash" have nice informations about it too. I test it and both works. For myself i must say i like the "==" more.

Offline

Board footer

Powered by FluxBB