[Tfug] Running Script Based on Kernel Name

Andrew Ayre andy at britishideas.com
Mon Oct 29 11:15:31 MST 2007


I now have two kernels to choose from in Grub. One contains "generic" in
the name and the other contains "realtime" in the name, with the
realtime kernel having RTAI support.

My next problem is that I need to run a couple of commands at startup
and shutdown when the realtime kernel is used, but not when the generic
kernel is used.

Is there a standard way of doing this or do I need to write a shell
script that greps uname -a for "realtime"? I'm not really familiar with
shell scripting - anyone know of an example of an if statement grepping
uname -a output for an (arbitary) string?

thanks for the help! Andy

-- 
Andy
PGP Key ID: 0x67090A54




More information about the tfug mailing list