And if above doesn't work (wich is hardly the case):
Most likely you will find a file in /etc, called something like "<distro>_version". Let your program search for such file, and cat the output. Though, i must add, that it's distro dependent. Some use another file for this.
Another way might be the uname -a command. This might give you some usefull info too.
Last edited by teebones; 10-13-2005 at 02:40 AM.