Re: glean distro version from /etc/*release
- From: cdevers@xxxxxxxxx (Chris Devers)
- Date: Fri, 8 Apr 2005 14:03:37 -0400 (EDT)
On Fri, 8 Apr 2005, Stephen Day wrote:
> On Friday 08 April 2005 5:11 pm, Chris Devers wrote:
> > [cdevers@debian ~]$ uname -a
> > Linux debian 2.4.26-smp-p4 #1 SMP Thu Apr 29 17:20:05 EDT 2004 i686
> > unknown [cdevers@debian ~]$
>
> uname -a does not return the distribution. The second field is the
> hostname, which in your case seems to be 'debian'.
Right.
My line of thinking is that `uname -a` should be able to portably
identify the operating system, kernel version, and hardware
architecture, and anything beyond that you can infer by just trying
things and seeing what works.
In general, Perl scripts should be pretty portable across at least
POSIX-ish systems (any Linux version, OSX, Solaris, BSD, etc), and you
shouldn't need to know any more than what you'd get from $^O. If you
need some more detail, `uname -a` (among other ways) can give you most
of what you need.
There must be a module for this, but I can't think of the name...
--
Chris Devers
- References:
- glean distro version from /etc/*release
- From: D. J. Birkett
- Re: glean distro version from /etc/*release
- From: Chris Devers
- Re: glean distro version from /etc/*release
- From: Stephen Day
- glean distro version from /etc/*release
- Prev by Date:
Re: glean distro version from /etc/*release - Next by Date:
Simple MySQL Example? - Previous by thread:
Re: glean distro version from /etc/*release - Next by thread:
IO::Socket Disconection Detection - Index(es):