I am building out parts of the Citihub web site monitoring solution using Zabbix and have decided that I need a User Procedure to report certain distro facts since we seem to be using whatever OS the solution author feels like. (We have several Linux distros within the web site. Zabbix comes with a number of agents which report certain static facts about the systems being monitored, and these have been the inspiration for this piece of work.
I have written a program (shell script) that browses and parses /etc/*-release. It has been tested for RHES, SUSE, Fedora and Ubuntu 10. It ends with status 0 if it works OK and 1 for a universal error i.e. if it cannot detect and parse the *-release files. It replies status 10 if neither lsb-release nor system-release files are present, and status 255 if it is not Linux. I put this program in /usr/local/bin.
I wrote a script called showdistro which works on a bunch of distros with varying verboseness.