LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices



Reply
 
Search this Thread
Old 04-14-2005, 10:38 AM   #1
The Joker
LQ Newbie
 
Registered: Mar 2005
Location: Gothenburg, Sweden
Distribution: various
Posts: 19

Rep: Reputation: 0
/etc/redhat-release file on other distributions?


Ok, I'm writing an application that finds out some basic information about the computer and then stores it in an XML file for future reference, and one of the things it tracks down is which distribution the computer has. The code I use for this is a simple If clause that checks for a "etc/redhat-release", "etc/mandrake-release", "etc/slackware-version" etc. etc. file and then prints the contents of the file it finds. However, I've heard that some distributions other than redhat may have a "redhat-release" file for compatibility reasons. My question is, what does the redhat-release file on a different distribution contain? (I.e what would the output of "cat /etc/redhat-release" be?) I can just put the "etc/redhat-release" check last to not have to worry about this, but I'm still curious.

Thanks in advance.
 
Old 04-15-2005, 11:38 AM   #2
john2
Member
 
Registered: Aug 2004
Location: UK
Distribution: SolydK, Kubuntu, Mageia, OpenSUSE
Posts: 81

Rep: Reputation: 22
The /etc/redhat-release files in Mandrake and Centos contain the correct information for the distro - I think they just link to /etc/mandrake-release and /etc/centos-release respectively but I haven't got access at the moment to a machine running these distros to confirm this.
 
Old 04-18-2005, 04:17 AM   #3
The Joker
LQ Newbie
 
Registered: Mar 2005
Location: Gothenburg, Sweden
Distribution: various
Posts: 19

Original Poster
Rep: Reputation: 0
Oh, so then it doesn't really matter which file I take the info from in the first place. Ok, thanks!

Another question, do you (or anyone) know if certain distros might contain extra release files other than redhat-release?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redhat Release 9 tiredoflogins Linux - Newbie 1 10-05-2004 04:40 PM
What goes into a new release of RedHat? maximus power Red Hat 1 05-15-2004 01:29 AM
file distributions for documents ergo_sum Linux - Newbie 7 08-12-2003 11:01 AM
New Redhat Release Darkstar Linux - Distributions 3 09-13-2002 10:16 PM
Redhat Release? mikeshn Linux - Newbie 1 03-09-2002 11:28 AM


All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration