FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 06-28-2010, 03:29 PM
fred smith
 
Default /etc/redhat-release

Hi!

I'm responsible for the installation program for a commercial app that
runs on several versions of RHEL.

I know I can find out what version I'm running on by examining
/etc/redhat-release.

But the installer wants to know how to parse out its contents in some
sensible way so it can tell exactly what it's working with, so the
current algorithm is to just do a text match on the file's contents.

To do that means that I have to know what all the possibilities are when
I write/update the installer.

i've looked around quite a lot and can't find anywhere a resource that
would tell me what all the various possibilities are the Red Hat uses
in their various releases. So, I"m left to installing (or at least
_finding_) a system with each variant and looking at its /etc/redhat-release
file.

not very efficient...

Does anyone know of a listing of what all the actual contents are?
I've not turned one up in the RH KB, or anywhere else.

Thanks in advance!

--
---- Fred Smith -- fredex@fcshome.stoneham.ma.us ----------------------------
Do you not know? Have you not heard?
The LORD is the everlasting God, the Creator of the ends of the earth.
He will not grow tired or weary, and his understanding no one can fathom.
----------------------------- Isaiah 40:28 (niv) -----------------------------

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 04:54 PM
"Broekman, Maarten"
 
Default /etc/redhat-release

Use lsb_release instead. It knows how to parse the contents of the
redhat-release file into appropriate fields, saving you from having to
do that yourself.

--Maarten

> -----Original Message-----
> From: redhat-list-bounces@redhat.com [mailto:redhat-list-
> bounces@redhat.com] On Behalf Of fred smith
> Sent: Monday, June 28, 2010 11:30 AM
> To: redhat-list@redhat.com
> Subject: /etc/redhat-release
>
> Hi!
>
> I'm responsible for the installation program for a commercial app
that
> runs on several versions of RHEL.
>
> I know I can find out what version I'm running on by examining
> /etc/redhat-release.
>
> But the installer wants to know how to parse out its contents in
some
> sensible way so it can tell exactly what it's working with, so the
> current algorithm is to just do a text match on the file's contents.
>
> To do that means that I have to know what all the possibilities are
when
> I write/update the installer.
>
> i've looked around quite a lot and can't find anywhere a resource
that
> would tell me what all the various possibilities are the Red Hat uses
> in their various releases. So, I"m left to installing (or at least
> _finding_) a system with each variant and looking at its /etc/redhat-
> release
> file.
>
> not very efficient...
>
> Does anyone know of a listing of what all the actual contents are?
> I've not turned one up in the RH KB, or anywhere else.
>
> Thanks in advance!
>
> --
> ---- Fred Smith -- fredex@fcshome.stoneham.ma.us
------------------------
> ----
> Do you not know? Have you not heard?
> The LORD is the everlasting God, the Creator of the ends of the
> earth.
> He will not grow tired or weary, and his understanding no one can
> fathom.
> ----------------------------- Isaiah 40:28 (niv)
------------------------
> -----
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 05:33 PM
inode0
 
Default /etc/redhat-release

On Mon, Jun 28, 2010 at 11:54 AM, Broekman, Maarten
<Maarten.Broekman@fmr.com> wrote:
> Use lsb_release instead. It knows how to parse the contents of the
> redhat-release file into appropriate fields, saving you from having to
> do that yourself.

Although lots of people don't install that on servers given what it
pulls in. This is a pain point as I have scripts that often need
maintenance due to seemingly unnecessary changes between even point
releases.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 06:51 PM
"Broekman, Maarten"
 
Default /etc/redhat-release

> -----Original Message-----
> From: redhat-list-bounces@redhat.com [mailto:redhat-list-
> bounces@redhat.com] On Behalf Of inode0
> Sent: Monday, June 28, 2010 1:33 PM
> To: General Red Hat Linux discussion list
> Subject: Re: /etc/redhat-release
>
> On Mon, Jun 28, 2010 at 11:54 AM, Broekman, Maarten
> <Maarten.Broekman@fmr.com> wrote:
> > Use lsb_release instead. It knows how to parse the contents of the
> > redhat-release file into appropriate fields, saving you from having
to
> > do that yourself.
>
> Although lots of people don't install that on servers given what it
> pulls in. This is a pain point as I have scripts that often need
> maintenance due to seemingly unnecessary changes between even point
> releases.
>
> John

Is the "pain point" the libraries that it requires (in particular,
libX11, etc)? Just wondering because the commands that are required
look like what you would expect on any reasonable system.

--Maarten


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 07:07 PM
inode0
 
Default /etc/redhat-release

On Mon, Jun 28, 2010 at 1:51 PM, Broekman, Maarten
<Maarten.Broekman@fmr.com> wrote:
> Is the "pain point" the libraries that it requires (in particular,
> libX11, etc)? *Just wondering because the commands that are required
> look like what you would expect on any reasonable system.

No, lsb just pulls in various packages that many people don't want on servers.

The "pain point" I mentioned was the inconsistent treatment of
/etc/redhat-release which causes maintenance work for those of us who
do need to parse it in scripts over time. We can expect distinct cases
for each major release of RHEL but there have also been occasions
where this file has changed in unpredictable ways across minor update
levels as well.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 07:15 PM
"Stainforth, Matthew (SD/DS)"
 
Default /etc/redhat-release

> The "pain point" I mentioned was the inconsistent treatment of
> /etc/redhat-release which causes maintenance work for those of us who
> do need to parse it in scripts over time. We can expect distinct cases
> for each major release of RHEL but there have also been occasions
> where this file has changed in unpredictable ways across minor update
> levels as well.

Have you thought about parsing the output of "rpm -q redhat-release"? I have need of the same functionality and was going to use this approach.

Matt

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 07:54 PM
inode0
 
Default /etc/redhat-release

On Mon, Jun 28, 2010 at 2:15 PM, Stainforth, Matthew (SD/DS)
<Matthew.Stainforth@gnb.ca> wrote:
>> The "pain point" I mentioned was the inconsistent treatment of
>> /etc/redhat-release which causes maintenance work for those of us who
>> do need to parse it in scripts over time. We can expect distinct cases
>> for each major release of RHEL but there have also been occasions
>> where this file has changed in unpredictable ways across minor update
>> levels as well.
>
> Have you thought about parsing the output of "rpm -q redhat-release"? *I have need of the same functionality
> and was going to use this approach.

I just began with RHEL3 ... and over time it grew into a bit of a
mess. If I were starting over I might consider this but I don't think
the rpm release versions map all that cleanly onto major.minor release
numbers either.

If you find a slick way to do that though do share it.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 08:07 PM
"Marti, Robert"
 
Default /etc/redhat-release

4.8 is redhat-release-4ES-9
5.5 is redhat-release-5Server-5.5.0.2

So 5 might be relatively clean, but 4 won't be, at least for the minor.

Rob Marti

-----Original Message-----
From: redhat-list-bounces@redhat.com [mailto:redhat-list-bounces@redhat.com] On Behalf Of inode0
Sent: Monday, June 28, 2010 2:54 PM
To: General Red Hat Linux discussion list
Subject: Re: /etc/redhat-release

On Mon, Jun 28, 2010 at 2:15 PM, Stainforth, Matthew (SD/DS) <Matthew.Stainforth@gnb.ca> wrote:
>> The "pain point" I mentioned was the inconsistent treatment of
>> /etc/redhat-release which causes maintenance work for those of us who
>> do need to parse it in scripts over time. We can expect distinct
>> cases for each major release of RHEL but there have also been
>> occasions where this file has changed in unpredictable ways across
>> minor update levels as well.
>
> Have you thought about parsing the output of "rpm -q redhat-release"? *
> I have need of the same functionality and was going to use this approach.

I just began with RHEL3 ... and over time it grew into a bit of a mess. If I were starting over I might consider this but I don't think the rpm release versions map all that cleanly onto major.minor release numbers either.

If you find a slick way to do that though do share it.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 08:14 PM
 
Default /etc/redhat-release

<snip>
> On Mon, Jun 28, 2010 at 2:15 PM, Stainforth, Matthew (SD/DS)
> <Matthew.Stainforth@gnb.ca> wrote:
>>> The "pain point" I mentioned was the inconsistent treatment of
>>> /etc/redhat-release which causes maintenance work for those of us who
>>> do need to parse it in scripts over time. We can expect distinct
>>> cases for each major release of RHEL but there have also been
>>> occasions where this file has changed in unpredictable ways across
>>> minor update levels as well.
<snip>
Y'know, when all you want is lsb_release, and I know I'd noticed it when I
installed it on some of our servers, but this finally penetrated, so I
just did rpm -qi -R redhat-lsb. Can *ANYONE* explain to me why it needs
libX11? I mean, it's a bloody command line shell script that prints to
STDOUT!

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 06-28-2010, 08:27 PM
inode0
 
Default /etc/redhat-release

On Mon, Jun 28, 2010 at 3:14 PM, <m.roth@5-cent.us> wrote:
> <snip>
>> On Mon, Jun 28, 2010 at 2:15 PM, Stainforth, Matthew (SD/DS)
>> <Matthew.Stainforth@gnb.ca> wrote:
>>>> The "pain point" I mentioned was the inconsistent treatment of
>>>> /etc/redhat-release which causes maintenance work for those of us who
>>>> do need to parse it in scripts over time. We can expect distinct
>>>> cases for each major release of RHEL but there have also been
>>>> occasions where this file has changed in unpredictable ways across
>>>> minor update levels as well.
> <snip>
> Y'know, when all you want is lsb_release, and I know I'd noticed it when I
> installed it on some of our servers, but this finally penetrated, so I
> just did rpm -qi -R redhat-lsb. Can *ANYONE* explain to me why it needs
> libX11? I mean, it's a bloody command line shell script that prints to
> STDOUT!

Having the redhat-lsb package installed is *supposed* to mean your
system is LSB compliant. That entails a lot more than that one shell
script.

John

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 05:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org