[fpc-pascal] Detecting what is the linux distro

Torsten Bonde Christiansen tc at epidata.dk
Mon Oct 11 13:46:29 CEST 2010


On 2010-10-11 13:33, ik wrote:
> Hello List,
>
> I'm looking for a proper way to detect the type of Linux distro.
>
> At first I thought about /etc/issue, but it seems that some are 
> abusing this file.
> Many distro's uses /etc/XXXX__release, where XXXX is their name, but 
> it's not a proper way either to detect, because not everyone uses it.
>
> Any additional ideas ?
Most distros also include their name in the  kernel, so using "uname -a" 
could also give a hint. But AFAIK there is no common place where all 
distros store the name.

Kind regards,
Torsten Bonde Christiansen.



More information about the fpc-pascal mailing list