Just checked Ubuntu (5.04, 5.10) and there is no /etc/release file.
There is an /etc/issue file with the information and some what appears
to be trailing formatting (SuSE includes both a release and issue
files).
houghi wrote:
On Mon, Oct 17, 2005 at 11:27:24PM +0200, Pascal Bleser wrote:
Frank.Pikelner@blue-dot.ca wrote:
...
From a developer point of view is there a reliable/consistent way to
obtain Linux distribution name and release information?
/etc/SuSE-release
/etc/redhat-release
/etc/mandrake-release
I asume he wants to know a consistant way across Linux distributions.
It would indeed be nice if there where something like /etc/release,
even
if it only were a symlink, on each and every Linux distro.
Well, yes, it's more or less consistent ("more or less" because I'm not
sure every distro ships such
a file).
You just have to probe for the existence of these files, and then parse
their content.
Unfortunately, the format inside those files is different from one
distro to the other.
But, well.. write and maintain it once. It's not the nicest way there
could be, but it definately
works. At least on the distributions that include such a file.
The hard part is to collect the information on how that file is called
with every distro you want to
support/detect, and then look into those files to see how they're built
up. Then parse.
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\
_\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDVBv9r3NMWliFcXcRAgIEAKCLBgqSjeupjhBtsir23AkXaNQiIQCePXJU
5cSYgQEwZiqxY7R2xePCLSA=
=b9bJ
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-help@opensuse.org
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Le present message electronique (y compris les pieces qui y sont annexees, le cas echeant) s'adresse au destinataire indique et peut contenir des renseignements de caractere prive ou confidentiel. Si vous n'etes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a ete transmis par erreur, veuillez en informer l'expediteur et le supprimer immediatement.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------