# Sun Solaris
Sun Solaris 2.5.1 solaris 2.5.1 $uname =~ /SunOS.*\s5\.5\.1\s/i
Sun Solaris 2.6 solaris 2.6 $uname =~ /SunOS.*\s5\.6\s/i
Sun Solaris $1 solaris $1 $uname =~ /SunOS.*\s5\.(\S+)\s/i
# Caldera clones
Lycoris Desktop/LX 1.0 open-linux 3.1e $etc_issue =~ /Lycoris Desktop/i
# Caldera's Linux
Caldera OpenLinux eServer 2.3 open-linux 2.3e $etc_issue =~ /OpenLinux.*eServer.*\n.*\s2\.3\s/i
Caldera OpenLinux 2.3 open-linux 2.3 $etc_issue =~ /OpenLinux.*\n.*\s2\.3\s/i
Caldera OpenLinux 2.4 open-linux 2.4 $etc_issue =~ /OpenLinux.*\n.*\s2\.4\s/i
Caldera OpenLinux 2.5 open-linux 2.5 $etc_issue =~ /OpenLinux.*\n.*\s2\.5\s/i || $etc_issue =~ /Caldera.*2000/i
Caldera OpenLinux 3.1 open-linux 3.1e $etc_issue =~ /OpenLinux.*3\.1/i
# Redhat enterprise clones
Whitebox Linux $1 redhat-linux 10.0 `cat /etc/whitebox-release 2>/dev/null` =~ /White\s+Box\s+Enterprise\s+Linux\s+release\s+(\S+)/i
Tao Linux $1 redhat-linux 10.0 `cat /etc/redhat-release 2>/dev/null` =~ /Tao\s+Linux\s+release\s+(\S+)/i
CentOS Linux $1 redhat-linux 10.0 `cat /etc/centos-release /etc/redhat-release 2>/dev/null` =~ /CentOS\s+release\s+(\S+)/i && $1 < 4
CentOS Linux $1 redhat-linux 12.0 `cat /etc/centos-release /etc/redhat-release 2>/dev/null` =~ /CentOS\s+release\s+(\S+)/i && $1 >= 4
Scientific Linux $1 redhat-linux 10.0 `cat /etc/redhat-release 2>/dev/null` =~ /Scientific\s+Linux.*\s+release\s+(\S+)/i
Gralinux $1 redhat-linux $2+8.0 `cat /etc/redhtat-release 2>/dev/null` =~ /Gralinux\s+(ES|AS|WS)\s+release\s+(\d+)/i
# Redhat enterprise versions
Redhat Enterprise Linux 2.1AS redhat-linux 7.3 `cat /etc/redhat-release 2>/dev/null` =~ /(Advanced\s+Server.*2\.1)|(AS.*2\.1)/i
Redhat Enterprise Linux 2.1ES redhat-linux 7.3 `cat /etc/redhat-release 2>/dev/null` =~ /ES.*2\.1/
Redhat Enterprise Linux 2.1WS redhat-linux 7.3 `cat /etc/redhat-release 2>/dev/null` =~ /WS.*2\.1/
Redhat Enterprise Linux 3.0AS redhat-linux 10.0 `cat /etc/redhat-release 2>/dev/null` =~ /(3\.0AS)|(2\.9\.5AS)|(AS\s+release\s+3)/i
Redhat Enterprise Linux "$2$1" redhat-linux $2 >= 4 ? $2+8.0 : 10.0 `cat /etc/redhat-release 2>/dev/null` =~ /(ES|AS|WS)\s+release\s+(\S+)/
# Redhat enterprise desktop
Redhat Linux Desktop $1 redhat-linux 10.0 `cat /etc/redhat-release 2>/dev/null` =~ /Desktop\s+release\s+(\S+)/i || `cat /etc/redhat-release 2>/dev/null` =~ /ES\s+release\s+(\S+)/i
# Redhat clones
AlphaCore Linux $1 redhat-linux 11.0 `cat /etc/alphacore-release 2>/dev/null` =~ /Alpha\s*Core\s+release\s+(\S+)\s/i
X/OS Linux $1 redhat-linux sprintf("%.1f", 9.0+$1) `cat /etc/redhat-release /etc/fedora-release 2>/dev/null` =~ /X\/OS.*release\s(\S+)\s/i
Asianux $1 redhat-linux 10.0 `cat /etc/release /etc/asianux-release 2>/dev/null` =~ /Asianux\s+release\s+(\S+)/i
Haansoft Linux $1 redhat-linux 10.0 `cat /etc/Haansoft-release 2>/dev/null` =~ /Haansoft\s+Linux\s+OS\s+release\s+(\S+)/i
cAos Linux $1 redhat-linux sprintf("%.1f", 10.0+$1) `cat /etc/caos-release 2>/dev/null` =~ /release\s+(\S+)/i
# Free Redhat Linux and Fedora
Redhat Linux $1 redhat-linux $1 `cat /etc/redhat-release 2>/dev/null` =~ /red.*hat.*release\s+(\S+)/i && `cat /etc/redhat-release 2>/dev/null` !~ /[eE]nterprise|AS|ES|WS|[aA]dvanced/
Redhat Linux "Fedora $1" redhat-linux sprintf("%.1f", 9.0+$1) `cat /etc/redhat-release /etc/fedora-release 2>/dev/null` =~ /Fedora.*\s([0-9\.]+)\s/i || `cat /etc/redhat-release /etc/fedora-release 2>/dev/null` =~ /Fedora.*\sFC(\S+)\s/i
# Slackware clones
White Dwarf Linux 2.1.0 slackware-linux 8.1 `cat /tmp/wd/version 2>/dev/null` =~ /2\.1\.0/
# Slackware Linux
Slackware Linux $1 slackware-linux $1 `cat /etc/slackware-version 2>/dev/null` =~ /([0-9\.]+)/
# Debian clones
Xandros Linux 2.0 debian-linux 3.0 $etc_issue =~ /Xandros.*\s2\.0/i
Xandros Linux 3.0 debian-linux 3.1 $etc_issue =~ /Xandros.*\s3\.0/i
APLINUX 1.3 debian-linux 3.1 $etc_issue =~ /APLINUX.*1\.3/i
# Debian Linux versions with numbers
Debian Linux $1 debian-linux $1 $etc_issue =~ /Debian.*\s([0-9\.]+)\s/i
Debian Linux $1 debian-linux 3.2 $etc_issue =~ /Debian.*\stesting\/unstable\s/i
# SuSE enterprise versions
SuSE OpenExchange Linux $1 suse-linux 8.2 `cat /etc/SLOX-release 2>/dev/null` =~ /VERSION\s+=\s+(\S+)/i
SuSE SLES Linux $1 suse-linux sprintf("%.1f", $1) $etc_issue =~ /SuSE\s+SLES-(\S+)/i
# SuSE Linux
SuSE Linux $1 suse-linux $1 `cat /etc/SuSE-release 2>/dev/null` =~ /([0-9\.]+)/ || $etc_issue =~ /SuSE\s+Linux\s+(\S+)\s/i
# United Linux only ever had version 1.0 I think
United Linux $1 united-linux $1 `cat /etc/UnitedLinux-release 2>/dev/null` =~ /([0-9\.]+)/
# Corel Linux
Corel Linux $1 corel-linux $1 $etc_issue =~ /Corel\s+LINUX\s+(\S+)/i
# Turbo Linux
TurboLinux $1 turbo-linux sprintf("%.1f", $1) `cat /etc/turbolinux-release 2>/dev/null` =~ /([0-9\.]+)/i
# Cobalt Linux, from the Raq and Qube systems
Cobalt Linux $1 cobalt-linux $1 $etc_issue =~ /Cobalt\s+Linux\s+release\s+(\S+)/i || `cat /etc/cobalt-release 2>/dev/null` =~ /([0-9\.]+)/
Cobalt Linux 6.4 cobalt-linux 6.4 `uname -r` =~ /2.2.16/ && -r "/etc/cobalt-release"
# Mandrake corporate
Mandrake Linux Corporate Server 1.0 redhat-linux 6.2 $etc_issue =~ /Mandrake\s+Corporate\s+Server\s+release\s+1\.0/i
# Mandrake derivatives
pclinuxos Linux 2005 mandrake-linux 10.0 `cat /etc/mandrake-release 2>/dev/null` =~ /pclinuxos\s+Linux\s+release\s+2005/i
# Mandrake Linux
Mandrake Linux 5.3 redhat-linux 5.0 $etc_issue =~ /Mandrake\s+release\s+5\.3/i
Mandrake Linux 6.0 redhat-linux 6.0 $etc_issue =~ /Mandrake\s+release\s+6\.0/i
Mandrake Linux 6.1 redhat-linux 6.0 $etc_issue =~ /Mandrake\s+release\s+6\.1/i
Mandrake Linux 7.0 redhat-linux 6.1 $etc_issue =~ /Mandrake\s+release\s+7\.0/i
Mandrake Linux 7.1 redhat-linux 6.2 $etc_issue =~ /Mandrake\s+release\s+7\.1/i
Mandrake Linux $1 mandrake-linux $1 `cat /etc/mandrake-release 2>/dev/null` =~ /Mandrake.*?([0-9\.]+)/i || $etc_issue =~ /Mandrake\s+release\s+([0-9\.]+)/i || $etc_issue =~ /Mandrakelinux\s+release\s+([0-9\.]+)/i
# Conectiva Linux (now subsumed into Mandrake?)
Conectiva Linux 3.0 redhat-linux 5.2 $etc_issue =~ /Conectiva.*Linux.*3\.0/i
Conectiva Linux 4.0 redhat-linux 6.0 $etc_issue =~ /Conectiva.*Linux.*4\.0/i
Conectiva Linux 4.1 redhat-linux 6.1 $etc_issue =~ /Conectiva.*Linux.*4\.1/i
Conectiva Linux 4.2 redhat-linux 6.1 $etc_issue =~ /Conectiva.*Linux.*4\.2/i
Conectiva Linux 5.0 redhat-linux 6.2 $etc_issue =~ /Conectiva.*Linux.*5\.0/i
Conectiva Linux 5.1 redhat-linux 6.2 $etc_issue =~ /Conectiva.*Linux.*5\.1/i
Conectiva Linux 6.0 redhat-linux 7.0 $etc_issue =~ /Conectiva.*Linux.*6\.0/i
Conectiva Linux 7.0 redhat-linux 7.1 $etc_issue =~ /Conectiva.*Linux.*7\.0/i
Conectiva Linux 8 redhat-linux 7.3 $etc_issue =~ /Conectiva.*Linux.*\s8/i
Conectiva Linux 9 redhat-linux 8.0 $etc_issue =~ /Conectiva.*Linux.*\s9/i
Conectiva Linux 10 redhat-linux 10.0 $etc_issue =~ /Conectiva.*Linux.*\s10\s/i
# ThizLinux Desktop
ThizLinux Desktop 5.0 redhat-linux 7.2 $etc_issue =~ /Thiz.*Linux.*\s5\.0/i
ThizLinux Desktop 6.0 redhat-linux 7.3 $etc_issue =~ /Thiz.*Linux.*\s6\.0/i
ThizLinux Desktop 6.2 redhat-linux 7.3 $etc_issue =~ /Thiz.*Linux.*\s6\.2/i
ThizLinux Desktop 7.0 redhat-linux 8.0 $etc_issue =~ /Thiz.*Linux.*\s7\.0/i
# ThizLinux Server
ThizServer 4.3 redhat-linux 7.1 $etc_issue =~ /Thiz.*\s?Server.*\s4\.3/i
ThizServer 6.0 redhat-linux 7.3 $etc_issue =~ /Thiz.*\s?Server.*\s6\.0/i
ThizServer 7.0 redhat-linux 8.0 $etc_issue =~ /Thiz.*\s?Server.*\s7\.0/i
# MSC Linux, which used date-based versions (no longer released)
MSC Linux January 2001 msc-linux 2001.2 `cat /etc/msclinux-release 2>/dev/null` =~ /2001.*January/i || $etc_issue =~ /2001.*January/i
MSC Linux February 2001 msc-linux 2001.2 `cat /etc/msclinux-release 2>/dev/null` =~ /2001.*February/i || $etc_issue =~ /2001.*February/i
MSC Linux May 2001 msc-linux 2001.5 `cat /etc/msclinux-release 2>/dev/null` =~ /2001.*May/i || $etc_issue =~ /2001.*May/i
MSC Linux June 2001 msc-l