-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
houghi wrote:
> On Mon, Oct 17, 2005 at 11:27:24PM +0200, Pascal Bleser wrote:
>> [EMAIL PROTECTED] 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/
/\\ <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_\_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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]