[Date Prev][Date Next] [Chronological] [Thread] [Top]

[rtl] Distinguishing RT-Linux from Linux



At boot, I like to create a symbolic link for "/usr/src/linux" depending
on which kernel I'm using.  Heretofore, I've just used "uname -r" to
distinguish among different kernels.  Unfortunately, this method is
ambiguous when I have RT-Linux on the system as "2.0.35" could be either
the production Linux kernel or the RT-Linux kernel.

I think I've exhausted all the uname options, but I haven't found one
that nets anything different when compared with the standard kernel's
output for the same command.

Is there something better than the following:

       if /sbin/ksyms -a | grep " rt_" > /dev/null
       then
          SOURCE=rt-linux-`uname -r`
       else
          SOURCE=linux-`uname -r`
       fi


Thanks
Paul Serice
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/