On 11 October 2010 13:33, ik <ido...@gmail.com> wrote: > > 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 ?
If your distro complies with the LSB standards (most popular distros do), then you should have a /etc/lsb-release text file that you can parse. ------------------------------------ ~ $ cd /etc etc $ ls -l lsb-release -rw-r--r-- 1 root root 104 2010-07-08 16:55 lsb-release etc $ cat lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" ------------------------------------ -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net:8080/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal