[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Distinguishing RT-Linux from Linux
I did something similar, and used the following patch:
in include/linux/uts.h modify the UTS_SYSNAME to an appropriate one:
/*
* Defines for what uname() should return
*/
#ifndef UTS_SYSNAME
#define UTS_SYSNAME "Linux"
#endif
Anyway, wouldn't it be nice to introduce the idea of Paul into the new patches?
perhaps something like:
#define UTS_SYSNAME "Linux (RT)"
as not to corrupt scripts which rely on the good old "Linux", if not knowing, that
the string is continued after the 'space'?
Thomas
> From mikem@rtlinux.cs.nmt.edu Thu Sep 17 05:12 MET 1998
> Date: Thu, 17 Sep 1998 04:59:23 +0200
> From: Paul Serice <ugs@laci.net>
> MIME-Version: 1.0
> To: rt-linux Mailing List <rtl@rtlinux.cs.nmt.edu>
> Subject: [rtl] Distinguishing RT-Linux from Linux
> Content-Transfer-Encoding: 7bit
>
> 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/
>
--- [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/