# Pardus Linux
Pardus Linux			1.0			pardus-linux	1.0	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+1.0\s+/i
Pardus Linux			2007                   	pardus-linux	2007	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2007\s+/i
Pardus Linux			2007.1 Felis chaus	pardus-linux	2007.1	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2007.1\s+/i
Pardus Linux			2007.2 Caracac caracal	pardus-linux	2007.2	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2007.2\s+/i
Pardus Linux			2007.3 Lynx lynx	pardus-linux	2007.3	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2007.3\s+/i
Pardus Linux			2008			pardus-linux	2008	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2008\s+/i
Pardus Linux			2008.1 Hyaena hyaena	pardus-linux	2008.1	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2008.1\s+/i
Pardus Linux			2008.2 Canis aureus	pardus-linux	2008.2	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2008.2\s+/i
Pardus Linux			2009			pardus-linux	2009	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2009\s+/i
Pardus Linux			2009.1 Anthropoides virgo	pardus-linux	2009.1	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2009.1\s+/i
Pardus Linux			2009.2 Geronticus eremita	pardus-linux	2009.2	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2009.2\s+/i
Pardus Linux			2011			pardus-linux	2011	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2011\s+/i
Pardus Linux			2011.1 Dama Dama	pardus-linux	2011	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2011\s+/i
Pardus Linux			2011.2 Cervus elaptus	pardus-linux	2011	`cat /etc/pardus-release 2>/dev/null` =~ /Pardus\s+2011\s+/i

# Solaris forks
SmartOS				$2	solaris		$2	$uname =~ /SunOS.*\s5\.(\S+)\s(joyent_\d{8}T\d{6}Z)/i

# 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
Caldera OpenLinux		3.2	open-linux	3.2e	$etc_issue =~ /OpenLinux.*3\.2/i

# Redhat enterprise clones
Asianux Server			$1	redhat-linux	$1+10.0	`cat /etc/asianux-release 2>/dev/null` =~ /Asianux\s+Server\s+(\d+)/i
Asianux				$1	redhat-linux	$1+10.0	`cat /etc/asianux-release 2>/dev/null` =~ /Asianux\s+release\s+(\d+\.\d+)/i
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			$2	redhat-linux	$2+8.0	`cat /etc/centos-release /etc/redhat-release 2>/dev/null` =~ /CentOS\s+(Linux\s+)?release\s+(\S+)/i && $2 >= 4
Springdale Linux		$2	redhat-linux	$2+8.0	`cat /etc/centos-release /etc/redhat-release 2>/dev/null` =~ /Springdale\s+(Linux\s+)?release\s+(\S+)/i && $2 >= 4
Virtuozzo Linux			$2	redhat-linux	$2+8.0	`cat /etc/centos-release /etc/redhat-release 2>/dev/null` =~ /Springdale\s+(Linux\s+)?release\s+(\S+)/i && $2 >= 4
Scientific Linux		$1	redhat-linux	10.0	`cat /etc/redhat-release 2>/dev/null` =~ /Scientific\s+Linux.*\s+release\s+(\S+)/i && $1 < 4
Scientific Linux		$1	redhat-linux	$1+8.0	`cat /etc/redhat-release 2>/dev/null` =~ /Scientific\s+Linux.*\s+release\s+([0-9\.]+)/i && $1 >= 4
Gralinux			$1	redhat-linux	$2+8.0	`cat /etc/redhtat-release 2>/dev/null` =~ /Gralinux\s+(ES|AS|WS)\s+release\s+(\d+)/i
NeoShine Linux			$1	redhat-linux	$1+10	`cat /etc/neoshine-release 2>/dev/null` =~ /NeoShine\s+Linux.*release\s+(\d+)/i
Endian Firewall Linux		$1	redhat-linux	$1+10.0	`cat /etc/endian-release 2>/dev/null` =~ /release\s+(\S+)/
Oracle Enterprise Linux			$2	redhat-linux	$2+8.0	`cat /etc/enterprise-release 2>/dev/null` =~ /Enterprise.*Linux\s+Enterprise\s+Linux\s+Server\s+release\s+(\d+)/i
Oracle VM			$2	redhat-linux	$2+8.0	`cat /etc/ovs-release 2>/dev/null` =~ /Oracle.*VM\s+server\s+release\s+(\d+)/i
XenServer Linux			$1	redhat-linux	13.0	`cat /etc/redhat-release 2>/dev/null` =~ /XenServer\s+release\s+5\./
CloudLinux			$1	redhat-linux	$2+8.0	`cat /etc/redhat-release 2>/dev/null` =~ /CloudLinux.*release\s+(\S+)/
MostlyLinux			$1	redhat-linux	$2+8.0	`cat /etc/redhat-release 2>/dev/null` =~ /MostlyLinux\s+Linux\s+release\s+(\d+)/
Cloudrouter Linux		$1	redhat-linux	15	`cat /etc/cloudrouter-release 2>/dev/null` =~ /CloudRouter\s+release\s+(\d+)\s+/
Sangoma Linux			$1	redhat-linux	$2+8.0	`cat /etc/sangoma-release 2>/dev/null` =~ /Sangoma\s+Linux\s+(\S+)/
Virtuozzo Linux			$1	redhat-linux	$2+8.0	`cat /etc/vzlinux-release 2>/dev/null` =~ /Virtuozzo\s+Linux\s+release\s+(\S+)/

# 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 Linux			$2	redhat-linux	$2+8.0	`cat /etc/redhat-release 2>/dev/null` =~ /Red.*Hat\s+Enterprise\s+Linux\s+(Server|Client|Workstation|Everything)\s+release\s+(\d+)/i

# 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
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
Wind River Linux		3.0	redhat-linux	18.0	`cat /etc/wrs-release 2>/dev/null` =~ /Wind\s+River\s+Linux\s+3\.0/
Wind River Linux		2.0	redhat-linux	16.0	`cat /etc/wrs-release 2>/dev/null` =~ /Wind\s+River\s+Linux\s+2\.0/

# Amazon Linux
Amazon Linux			$1	redhat-linux	20.0	`cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux.*\s(201[1-9])/

# 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/
Fedora Linux			$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/
Slamd64 Linux			$1	slackware-linux	11.1	`cat /etc/slamd64-version 2>/dev/null` =~ /\s([0-9\.]+)/

# Slackware Linux
Slackware Linux			$1	slackware-linux	$1	`cat /etc/slackware-version 2>/dev/null` =~ /Slackware ([0-9\.]+)/i

# 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
Xandros Linux			$1	debian-linux	3.2	$etc_issue =~ /Xandros.*\s(4\.\d+)/i
APLINUX				1.3	debian-linux	3.1	$etc_issue =~ /APLINUX.*1\.3/i
BigBlock			$1	suse-linux	8.2	`cat /etc/bigblock-revision 2>/dev/null` =~ /Version:\s(1[0-9\.-]+)\s/i
BigBlock			$1	debian-linux	3.0	`cat /etc/bigblock-revision 2>/dev/null` =~ /Version:\s(2[0-9\.-]+)\s/i
Ubuntu Linux			$1	debian-linux	4.0	$etc_issue =~ /Ubuntu.*\sgutsy/i
Ubuntu Linux			$1	debian-linux	4.0	$etc_issue =~ /Ubuntu.*\s(7\.[0-9\.]+)\s/i
Ubuntu Linux			$1	debian-linux	4.0	$etc_issue =~ /Ubuntu.*\s(8\.[0-9\.]+)\s/i
Ubuntu Linux			$1	debian-linux	5.0	$etc_issue =~ /Ubuntu.*\s(9\.[0-9\.]+)\s/i
Ubuntu Linux			$1	debian-linux	5.0	$etc_issue =~ /Ubuntu.*\s(10\.[0-9\.]+)\s/i
Ubuntu Linux			$1	debian-linux	6.0	$etc_issue =~ /Ubuntu.*\s(11\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+natty/i
Ubuntu Linux			$1	debian-linux	7.0	$etc_issue =~ /Ubuntu.*\s(12\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+precise/i
Ubuntu Linux			$1	debian-linux	8.0	$etc_issue =~ /Ubuntu.*\s(13\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+raring/i
Ubuntu Linux			$1	debian-linux	8.0	$etc_issue =~ /Ubuntu.*\s(14\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+trusty/i
Ubuntu Linux			$1	debian-linux	8.0	$etc_issue =~ /Ubuntu.*\s(15\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+vidid/i
Ubuntu Linux			$1	debian-linux	9.0	$etc_issue =~ /Ubuntu.*\s(16\.[0-9\.]+)\s/i || $etc_issue =~ /Ubuntu\s+vidid/i
Ubuntu Linux			$1	debian-linux	3.1	$etc_issue =~ /Ubuntu.*\s([0-9\.]+)\s/i
Mepis Linux			$1	debian-linux	$1	$etc_issue =~ /MEPIS/ && `cat /etc/debian_version 2>/dev/null` =~ /([0-9\.]+)/
Mepis Linux			$1	debian-linux	4.0	$etc_issue =~ /MEPIS/ && `cat /etc/debian_version 2>/dev/null` =~ /(stable)/
Devuan Linux		$1	debian-linux	8.0	$etc_issue =~ /Devuan/ && `cat /etc/devuan_version 2>/dev/null` =~ /^(jessie)/i
Devuan Linux		$1	debian-linux	9.0	$etc_issue =~ /Devuan/ && `cat /etc/devuan_version 2>/dev/null` =~ /^(ascii)/i
Devuan Linux		$1	debian-linux	10.0	$etc_issue =~ /Devuan/ && `cat /etc/devuan_version 2>/dev/null` =~ /^(beowulf)/i
Devuan Linux		$1	debian-linux	10.0	$etc_issue =~ /Devuan/ && `cat /etc/devuan_version 2>/dev/null` =~ /^(ceres)/i

# Linux Mint (Mint should be before Debian to avoid false-positive)
Linux Mint			6	debian-linux	5.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 6 Felicia"/
Linux Mint			7	debian-linux	5.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 7 Gloria"/
Linux Mint			8	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 8 Helena"/
Linux Mint			9	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 9 Isadora"/
Linux Mint			10	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 10 Julia"/
Linux Mint			11	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 11 Katya"/
Linux Mint			12	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"/
Linux Mint			13	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 13 Maya"/
Linux Mint			14	debian-linux	6.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 14 Nadia"/
Linux Mint			15	debian-linux	7.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 15 Olivia"/
Linux Mint			16	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 16 Petra"/
Linux Mint			17	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 17 Qiana"/
Linux Mint			17.1	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 17.1 Rebecca"/
Linux Mint			17.2	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"/
Linux Mint			17.3	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 17.3 Rosa"/
Linux Mint			18	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 18 Sarah"/
Linux Mint			18.1	debian-linux	8.0	`cat /etc/lsb-release 2>/dev/null | grep DISTRIB_DESCRIPTION` =~ /^DISTRIB_DESCRIPTION="Linux Mint 18.1 Serena"/

# Debian Linux versions with numbers
Debian Linux			$1	debian-linux	$1	$etc_issue =~ /Debian.*\s([0-9\.]+)\s/i || `cat /etc/debian_version 2>/dev/null` =~ /([0-9\.]+)/
Debian Linux			2.0	debian-linux	2.0	`cat /etc/debian_version 2>/dev/null` =~ /^(hamm)/i
Debian Linux			2.1	debian-linux	2.1	`cat /etc/debian_version 2>/dev/null` =~ /^(slink)/i
Debian Linux			2.2	debian-linux	2.2	`cat /etc/debian_version 2>/dev/null` =~ /^(potato)/i
Debian Linux			3.0	debian-linux	3.0	`cat /etc/debian_version 2>/dev/null` =~ /^(woody)/i
Debian Linux			3.1	debian-linux	3.1	`cat /etc/debian_version 2>/dev/null` =~ /^(sarge)/i
Debian Linux			4.0	debian-linux	4.0	`cat /etc/debian_version 2>/dev/null` =~ /^(etch)/i
Debian Linux			5.0	debian-linux	5.0	`cat /etc/debian_version 2>/dev/null` =~ /^(lenny)/i
Debian Linux			6.0	debian-linux	6.0	`cat /etc/debian_version 2>/dev/null` =~ /^(squeeze)/i
Debian Linux			7.0	debian-linux	7.0	`cat /etc/debian_version 2>/dev/null` =~ /^(wheezy)/i
Debian Linux			8.0	debian-linux	8.0	`cat /etc/debian_version 2>/dev/null` =~ /^(jessie)/i
Debian Linux			9.0	debian-linux	9.0	`cat /etc/debian_version 2>/dev/null` =~ /^(stretch)/i
# These change sometimes...
Debian Linux			9.0	debian-linux	9.0	`cat /etc/debian_version 2>/dev/null` =~ /^(stable)/i
# These don't have a version number yet, so we use the one from "stable"
Debian Linux			10.0	debian-linux	10.0	`cat /etc/debian_version 2>/dev/null` =~ /^(testing)/i
Debian Linux			10.0	debian-linux	10.0	`cat /etc/debian_version 2>/dev/null` =~ /^(unstable)/i
Debian Linux			10.0	debian-linux	10.0	`cat /etc/debian_version 2>/dev/null` =~ /^(sid)/i
Debian Linux			10.0	debian-linux	10.0	`cat /etc/debian_version 2>/dev/null` =~ /^(buster)/i
Debian Linux			11.0	debian-linux	11.0	`cat /etc/debian_version 2>/dev/null` =~ /^(bullseye)/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
pclinuxos Linux			2006	mandrake-linux	10.2	`cat /etc/mandrake-release 2>/dev/null` =~ /pclinuxos\s+Linux\s+release\s+2006/i
pclinuxos Linux			2007	mandrake-linux	10.3	`cat /etc/mandrake-release 2>/dev/null` =~ /PCLinuxOS\s+release\s+2007/i
pclinuxos Linux			2008	mandrake-linux	10.4	`cat /etc/mandrake-release 2>/dev/null` =~ /PCLinuxOS\s+release\s+2008/i
pclinuxos Linux			2009	mandrake-linux	10.5	`cat /etc/mandrake-release 2>/dev/null` =~ /PCLinuxOS\s+release\s+2009/i
Mageia Linux			$1	mandrake-linux	2011	`cat /etc/mageia-release 2>/dev/null` =~ /Mageia\s+release\s+(\d+)/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

# Mandriva Linux
Mandriva Linux			$2	mandrake-linux	10.2	$etc_issue =~ /(Mandrakelinux|Mandriva).*(2006\.\d+)/i || `cat /etc/mandrake-release 2>/dev/null` =~ /(Mandrakelinux|Mandriva).*(2007\.\d+)/i
Mandriva Linux			$2	mandrake-linux	10.3	$etc_issue =~ /(Mandrakelinux|Mandriva).*(2007\.\d+)/i || `cat /etc/mandrake-release 2>/dev/null` =~ /(Mandrakelinux|Mandriva).*(2007\.\d+)/i
Mandriva Linux			$2	mandrake-linux	10.4	$etc_issue =~ /(Mandrakelinux|Mandriva).*(2008\.\d+)/i || `cat /etc/mandrake-release 2>/dev/null` =~ /(Mandrakelinux|Mandriva).*(2008\.\d+)/i
Mandriva Linux			$2	mandrake-linux	10.5	$etc_issue =~ /(Mandrakelinux|Mandriva).*(2009\.\d+)/i || `cat /etc/mandrake-release 2>/dev/null` =~ /(Mandrakelinux|Mandriva).*(2009\.\d+)/i
Mandriva Linux			$2	mandrake-linux	$2	$etc_issue =~ /(Mandriva).*(20\d\d\.\d+)/i || `cat /etc/mandriva-release 2>/dev/null` =~ /(Mandriva).*(20\d\d\.\d+)/i

# Mandriva Corporate
Mandrake Linux Corporate Server	$i	mandrake-linux	$i	$etc_issue =~ /Mandrake\s+Linux\s+Corporate\s+Server\s+release\s+([0-9\.]+)/i
Mandriva Linux Enterprise Server	5.0	mandrake-linux	2009	$etc_issue =~ /Mandriva\s+Linux\s+Enterprise\s+Server\s+release\s+5\.0\s+\(Official\)\s+for\s+(i586|x86_64)/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-linux	2001.6	`cat /etc/msclinux-release 2>/dev/null` =~ /2001.*June/i || $etc_issue =~ /2001.*June/i
MSC Linux			August 2001	msc-linux	2001.8	`cat /etc/msclinux-release 2>/dev/null` =~ /2001.*August/i || $etc_issue =~ /2001.*August/i
MSC Linux			February 2002	msc-linux	2002.2	`cat /etc/msclinux-release 2>/dev/null` =~ /2002.*February/i || $etc_issue =~ /2002.*February/i
MSC Linux			March 2002	msc-linux	2002.3	`cat /etc/msclinux-release 2>/dev/null` =~ /2002.*March/i || $etc_issue =~ /2002.*March/i
MSC Linux			May 2002	msc-linux	2002.5	`cat /etc/msclinux-release 2>/dev/null` =~ /2002.*May/i || $etc_issue =~ /2002.*May/i
MSC Linux			July 2002	msc-linux	2002.7	`cat /etc/msclinux-release 2>/dev/null` =~ /2002.*July/i || $etc_issue =~ /2002.*July/i
MSC Linux			Nov 2002	msc-linux	2002.11	`cat /etc/msclinux-release 2>/dev/null` =~ /2002.*Nov/i || $etc_issue =~ /2002.*Nov/i

# SCI Linux, which has replaced MSC Linux
SCI Linux			2003 Summer	msc-linux	2003.6	`cat /etc/scilinux-relase 2>/dev/null` =~ /2003.*Summer/i
SCI Linux			2004 Summer	msc-linux	2004.6	`cat /etc/scilinux-relase 2>/dev/null` =~ /2004.*Summer/i
SCI Linux			2005 Summer	msc-linux	2005.6	`cat /etc/scilinux-relase 2>/dev/null` =~ /2005.*Summer/i

# PPC Linux
LinuxPPC			2000	redhat-linux	6.1	$etc_issue =~ /LinuxPPC\s+2000/i

# Trustix enterprise
Trustix SE			$1	trustix-linux	sprintf("%.1f", $1)	$etc_issue =~ /Trustix.*Enterprise.*([0-9\.]+)/i

# Trustix Linux
Trustix				1.1	redhat-linux	6.2	$etc_issue =~ /Trustix.*1\.1/i
Trustix				1.2	redhat-linux	7.0	$etc_issue =~ /Trustix.*1\.2/i
Trustix				1.5	redhat-linux	7.1	$etc_issue =~ /Trustix.*1\.5/i
Trustix				$1	trustix-linux	$1	$etc_issue =~ /Trustix.*\s([0-9\.]+)/i

# Trustix clones
Tawie Server Linux		$1	trustix-linux	$1	$etc_issue =~ /Tawie\s+Server\s+Linux.*([0-9\.]+)/i
TinySofa Linux			1.0	trustix-linux	2.0	$etc_issue =~ /tinysofa.*release\s+1\.0/i
TinySofa Linux			Classic 2.0	trustix-linux	2.2	`cat /etc/tinysofa-release 2>/dev/null` =~ /classic.*release\s+2\.0/i
TinySofa Linux			Enterprise 2.0	redhat-linux	11.0	`cat /etc/tinysofa-release 2>/dev/null` =~ /enterprise.*release\s+2\.0/i

# Cendio Linux (discontinued?)
Cendio LBS Linux		3.1	redhat-linux	6.1	$etc_issue =~ /Cendio\s*LBS.*\s3\.1/i || `cat /etc/lbs-release 2>/dev/null` =~ /3\.1/
Cendio LBS Linux		3.2	redhat-linux	6.2	$etc_issue =~ /Cendio\s*LBS.*\s3\.2/i || `cat /etc/lbs-release 2>/dev/null` =~ /3\.2/
Cendio LBS Linux		3.3	redhat-linux	6.2	$etc_issue =~ /Cendio\s*LBS.*\s3\.3/i || `cat /etc/lbs-release 2>/dev/null` =~ /3\.3/
Cendio LBS Linux		4.0	redhat-linux	7.1	$etc_issue =~ /Cendio\s*LBS.*\s4\.0/i || `cat /etc/lbs-release 2>/dev/null` =~ /4\.0/
Cendio LBS Linux		4.1	redhat-linux	7.1	$etc_issue =~ /Cendio\s*LBS.*\s4\.1/i || `cat /etc/lbs-release 2>/dev/null` =~ /4\.1/

# Ute Linux (never got beyond 1.0)
Ute Linux			1.0	redhat-linux	6.2	`cat /etc/ute-release 2>/dev/null` =~ /Ute\s+Linux\s+release\s+1\.0/i

# Lanthan Linux (appears to be dead)
Lanthan Linux			1.0	redhat-linux	6.2	$etc_issue =~ /Lanthan\s+Linux\s+release\s+1\.0/i || `cat /etc/lanthan-release 2>/dev/null` =~ /1\.0/
Lanthan Linux			2.0	redhat-linux	7.0	$etc_issue =~ /Lanthan\s+Linux\s+release\s+2\.0/i || `cat /etc/lanthan-release 2>/dev/null` =~ /2\.0/
Lanthan Linux			3.0	redhat-linux	7.1	$etc_issue =~ /Lanthan\s+Linux\s+release\s+3\.0/i || `cat /etc/lanthan-release 2>/dev/null` =~ /3\.0/

# Yellow Dog Linux, for PPC
Yellow Dog Linux		2.0	redhat-linux	7.0	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.0\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.0\s+/i
Yellow Dog Linux		2.1	redhat-linux	7.1	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.1\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.1\s+/i
Yellow Dog Linux		2.2	redhat-linux	7.2	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.2\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.2\s+/i
Yellow Dog Linux		2.3	redhat-linux	8.0	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.3\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /Yellow\s+Dog\s+Linux\s+release\s+2\.3\s+/i
Yellow Dog Linux		3.0	redhat-linux	9.0	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+3\.0\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /Yellow\s+Dog\s+Linux\s+release\s+3\.0\s+/i
Yellow Dog Linux		4.0	redhat-linux	11.0	$etc_issue =~ /Yellow\s+Dog\s+Linux\s+release\s+4\.0\s+/i || `cat /etc/yellowdog-release 2>/dev/null` =~ /\s4\.0\s/i

# Latinux (appears to be discontinued?)
Corvus Latinux			8.0	redhat-linux	7.1	`cat /etc/latinux-release 2>/dev/null` =~ /Latinux\s+8\s/i

# Immunix Linux (discontinued)
Immunix Linux			$1	redhat-linux	$1	$etc_issue =~ /Immunix.*\s([0-9\.]+)/i || `cat /etc/immunix-release 2>/dev/null` =~ /([0-9\.]+)/

# All versions of Gentoo (which don't appear to have version numbers)
Gentoo Linux			Any version	gentoo-linux	*	-d "/usr/portage"

# Secure Linux (now called Trustix?)
Secure Linux			1.0	redhat-linux	7.2	`cat /etc/securelinux-release 2>/dev/null` =~ /SecureLinux.*1\.0/i

# OpenNA Linux
OpenNA Linux			1.0	redhat-linux	9.0	`cat /etc/openna-release 2>/dev/null` =~ /release\s+1\.0\s/i
OpenNA Linux			2.0	redhat-linux	10.0	`cat /etc/openna-release 2>/dev/null` =~ /release\s+2\.0\s/i

# SoL Linux 
SoL Linux			17.00	sol-linux	17.00	-r "/etc/antitachyon-distribution" && `uname -r` =~ /2\.4\./
SoL Linux			18.00	sol-linux	18.00	-r "/etc/antitachyon-distribution" && `uname -r` =~ /2\.6\./

# Coherent Linux
Coherent Technology Linux	$1	coherent-linux	$1	$etc_issue =~ /coherent\s*technology.*\s([0-9\.]+)/i || `cat /etc/coherent-release 2>/dev/null` =~ /([0-9\.]+)/ 

# Linux for the playstation
Playstation Linux		1.0	redhat-linux	6.2	$etc_issue =~ /PS2\s+Linux\s+release\s+1.0/i

# StartCom Linux
StartCom Linux			$1	redhat-linux	10.0	`cat /etc/startcom-release 2>/dev/null` =~ /([0-9\.]+)/

# Yoper Linux
Yoper Linux			2.0	redhat-linux	10.0	`cat /etc/yoper-release 2>/dev/null` =~ /Yoper\s+Linux\s+2.0/i
Yoper Linux			2.1	redhat-linux	11.0	`cat /etc/yoper-release 2>/dev/null` =~ /Yoper\s+Linux\s+2.1/i
Yoper Linux			2.2	redhat-linux	12.0	`cat /etc/yoper-release 2>/dev/null` =~ /Yoper\s+Linux\s+2.2/i

# Caixa Linux
Caixa Magica			8.1	suse-linux	8.0	`cat /etc/CxM-release 2>/dev/null` =~ /8\.1/ || $etc_issue =~ /Caixa\s+8\.1\s/i
Caixa Magica			10.0	suse-linux	9.2	`cat /etc/CxM-release 2>/dev/null` =~ /10\.0/ || $etc_issue =~ /Caixa\s+10\.0\s/i

# openmamba Linux
openmamba Linux			$1	openmamba-linux	$1	`cat /etc/openmamba-release 2>/dev/null` =~ /openmamba\s+release\s+(\S+)/i

# All FreeBSD versions
FreeBSD				$1	freebsd		$1	`freebsd-version 2>/dev/null` =~ /([0-9]+\.[0-9\.]+)/i
FreeBSD				$1	freebsd		$1	$uname =~ /FreeBSD.*?\s([0-9]+\.[0-9\.]+)/i

# FreeBSD clones
DragonFly BSD			1.0	freebsd		4.8	$uname =~ /DragonFly.*?\s1\.0A/i
DragonFly BSD			1.2	freebsd		4.10	$uname =~ /DragonFly.*?\s1\.2A/i

# All OpenBSD versions
OpenBSD				$1	openbsd		$1	$uname =~ /OpenBSD.*?\s([0-9\.]+)/i

# All NetBSD versions
NetBSD				1.5	netbsd		1.5	$uname =~ /NetBSD.*1\.5/i
NetBSD				1.6	netbsd		1.6	$uname =~ /NetBSD.*1\.6/i
NetBSD				2.0	netbsd		2.0	$uname =~ /NetBSD.*2\.0/i
NetBSD				3.0	netbsd		3.0	$uname =~ /NetBSD.*3\.0/i
NetBSD				4.0	netbsd		4.0	$uname =~ /NetBSD.*4\.0/i
NetBSD				$1	netbsd		$1	`uname` =~ /NetBSD/ && `uname -r` =~ /([\d.]+)/

# BSDI (may not be detected properly)
BSDI				$1	freebsd		$1	$uname =~ /BSDI.*\s([0-9\.]+)/i

# HP/UX
HP/UX				$1	hpux		$1	$uname =~ /HP-UX.*(1[01]\.[0-9\.]+)/

# Irix
SGI Irix			$1	irix		$1	$uname =~ /IRIX.*([0-9]+\.[0-9]+)/i

# DEC OSF/1 or Tru64 (discontinued)
DEC/Compaq OSF/1		4.0	osf1		4.0	$uname =~ /OSF1.*4\.0/
DEC/Compaq OSF/1		5.1	osf1		5.1	$uname =~ /OSF1.*V5.1/

# AIX
IBM AIX				"$2.$1"	aix		"$2.$1"	$uname =~ /AIX\s+\S+\s+(\d+)\s+(\d+)\s+/i

# SCO's operating systems (no longer developed)
SCO UnixWare			2	unixware	2
SCO UnixWare			7	unixware	7
SCO UnixWare			8	unixware	8
SCO OpenServer			5	openserver	5	$uname =~ /SCO_SV.*\s5\./i
SCO OpenServer			6	openserver	6	$uname =~ /SCO_SV.*\s6\./i

# Apple's OS X versions
Mac OS X			10.12	macos		16.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.12/i
Mac OS X			10.11	macos		15.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.11/i
Mac OS X			10.10	macos		14.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.10/i
Mac OS X			10.9	macos		13.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.9/i
Mac OS X			10.8	macos		12.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.8/i
Mac OS X			10.7	macos		11.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.7/i
Mac OS X			10.6	macos		10.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.6/i
Mac OS X			10.5	macos		9.2	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.5/i
Mac OS X			10.4	macos		8.1	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.4/i
Mac OS X			10.3	macos		7.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.3/i
Mac OS X			10.2	macos		6.0	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.2/i
Mac OS X			10.1	macos		1.4	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.1/i
Mac OS X			10.0	macos		1.3	`sw_vers 2>/dev/null` =~ /ProductVersion:\s+10\.0/i

# Darwin, the open source version of OS X
Darwin				$1	macos		$1	$uname =~ /Darwin.*\s([0-9\.]+)/

# OpenDarwin
OpenDarwin			6.6.1	macos		6.0
OpenDarwin			6.6.2	macos		6.0
OpenDarwin			7.2.1	macos		7.0

# Webmin running under Windows
Cygwin				1.1	cygwin		1.1
Cygwin				1.3	cygwin		1.3

# Sun's desktop Linux and Solaris systems
Sun Java Desktop System		1.0 (Linux)	suse-linux	9.1	`cat /etc/SuSE-release 2>/dev/null` =~ /Java Desktop System.*\nVERSION = 1\.0/i
Sun Java Desktop System		2.0 (Linux)	suse-linux	9.2	`cat /etc/SuSE-release 2>/dev/null` =~ /Java Desktop System.*\nVERSION = 2\.0/i
Sun Java Desktop System		3.0 (Linux)	suse-linux	9.2	`cat /etc/SuSE-release 2>/dev/null` =~ /Java Desktop System.*\nVERSION = 3\.0/i
Sun Java Desktop System		2.0 (Solaris)	solaris		9	$uname =~ /SunOS.*\s5\.9\s/i && `cat /etc/sun-release 2>/dev/null` =~ /Sun\s+Java\s+Desktop/

# All other Linux variants, identified by kernel version
Generic Linux			$1	generic-linux	$1	`uname -r` =~ /^([0-9]+\.[0-9+])\./

# Windows
Windows				XP	windows		xp	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /XP/
Windows				2000	windows		2000	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /2000/
Windows				2003	windows		2003	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /2003|\s5\.2/
Windows				Vista	windows		Vista	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s6\.0\.6001/
Windows				2008	windows		2008	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s6\.0\.6002/
Windows				7	windows		7	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s6\.0\.76[0-9][0-9]/
Windows				8	windows		8	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s6\.2\.92[0-9][0-9]/
Windows				8.1	windows		8.1	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s6\.3\.9[0-9]00/
Windows				10	windows		10	(-d "c:/windows" || -d "c:/winnt") && `ver` =~ /\s10\.0\.[0-9][0-9][0-9][0-9]/
