You are not logged in.
Pages: 1
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
http://wiki.archlinux.org/index.php/Adding_Runlevels for the runlevels.
What do you mean by different modules?
Offline
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
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
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
Offline
@kordusit This works with "rc.local" and the rc.local.shutdown too. Feel free to experiment with it.
@ghostHack Be you sure with this "==" because "man test" say "STRING1 = STRING2"? I have only one "=" in my rc.local and it works.
Offline
@attila, it was late when I posted however
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
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
Pages: 1