[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: distro name



 $ cat /etc/fedora-release
 Fedora Core release 2 (Tettnang)
 $ ls -l /etc/redhat-release
 lrwxrwxrwx  1 root root 14 May 29 18:49 /etc/redhat-release -> fedora-release

Crap. Check this out:


[root@enigma etc]# cat redhat-release mandrake-release
Mandrake Linux release 10.0 (Official) for i586
Mandrake Linux release 10.0 (Official) for i586

This is a poor way to do it though because it is not pan-unix.
Maybe something in /proc?

IIRC pretty much all linux distros have /etc/<distroname>-release in place, at least Debian, RH-variants (RHL, RHEL+rebuilds, FC), SuSE and Mandrake have it, making it probably the best option.


 $ cat /etc/issue
 Fedora Core release 2 (Tettnang)
 Kernel \r on an \m

Perhaps /etc/issue is more generic? getty outputs this file with
uname -x replacing \x.


Looking at /etc/issue is a BAD idea because that's a system configuration
file. People put legalese ("unauthorized use prohibited")  and such in
there, can't be depended on.

- Panu -


_______________________________________________ Rpm-list mailing list Rpm-list@redhat.com https://www.redhat.com/mailman/listinfo/rpm-list


--


-----------------------------------------------------------------
| I can be reached on the following Instant Messenger services: |
|---------------------------------------------------------------|
| MSN: j_c_llings@hotmail.com  AIM: WyteLi0n  ICQ: 123291844 	|
|---------------------------------------------------------------|
| Y!: j_c_llings               Jabber: jcllings@njs.netlab.cz	|
-----------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]