32
32
# --- System guessing --- #
34
34
my $PLATFORM_INFO = {
35
"debian-3.0" => [ "Debian GNU/Linux", "3.0", "Woody" ],
36
"debian-3.1" => [ "Debian GNU/Linux", "3.1", "Sarge" ],
37
"ubuntu-5.04" => [ "Ubuntu Linux", "5.04", "Hoary" ],
38
"ubuntu-5.10" => [ "Ubuntu Linux", "5.10", "Breezy" ],
39
"ubuntu-6.06" => [ "Ubuntu Linux", "6.06", "Dapper" ],
40
"ubuntu-6.10" => [ "Ubuntu Linux", "6.10", "Edgy" ],
41
"ubuntu-7.04" => [ "Ubuntu Linux", "7.04", "Feisty" ],
42
"ubuntu-7.10" => [ "Ubuntu Linux", "7.10", "Gutsy" ],
43
"ubuntu-8.04" => [ "Ubuntu Linux", "8.04", "Hardy" ],
35
"debian" => [ "Debian GNU/Linux" ],
44
36
"redhat-5.2" => [ "Red Hat Linux", "5.2", "Apollo" ],
45
37
"redhat-6.0" => [ "Red Hat Linux", "6.0", "Hedwig" ],
46
38
"redhat-6.1" => [ "Red Hat Linux", "6.1", "Cartman" ],
117
109
"blackpanther-4.0" => "mandrake-9.0",
118
110
"conectiva-10" => "conectiva-9",
119
"debian-3.1" => "debian-3.0",
120
111
"mandrake-7.1" => "redhat-6.2",
121
112
"mandrake-7.2" => "redhat-6.2",
122
113
"mandrake-9.1" => "mandrake-9.0",
147
138
"slackware-12.0.0" => "slackware-9.1.0",
148
139
"bluewhite64-12.0.0" => "slackware-9.1.0",
149
140
"suse-9.1" => "suse-9.0",
150
"ubuntu-5.04" => "debian-3.0",
151
"ubuntu-5.10" => "debian-3.0",
152
"ubuntu-6.06" => "debian-3.0",
153
"ubuntu-6.10" => "debian-3.0",
154
"ubuntu-7.10" => "ubuntu-7.04",
155
"ubuntu-8.04" => "ubuntu-7.04",
156
141
"vine-3.1" => "vine-3.0",
157
142
"vlos-1.2" => "gentoo",
158
143
"nexenta-1.0" => "solaris-2.11",
159
"guadalinex-v4" => "debian-3.0",
162
146
return $metamap{$distro} if ($metamap{$distro});
367
351
my %platform_checks = (
368
352
"Linux" => [[ \&check_lsb ],
369
[ \&check_distro_file, "/etc/debian_version", "debian", "(.*)", { "testing/unstable" => "sarge" } ],
353
[ \&check_file_exists, "/etc/debian_version", "debian" ],
370
354
[ \&check_distro_file, "/etc/SuSE-release", "suse", "VERSION\\s*=\\s*(\\S+)" ],
371
355
[ \&check_distro_file, "/etc/blackPanther-release", "blackpanther", "^Linux Black Panther release (\\S+)" ],
372
356
[ \&check_distro_file, "/etc/blackPanther-release", "blackpanther", "^Black Panther ( L|l)inux release ([\\d\\.]+)" ],