version 1.14, 2007/06/28 13:30:06
|
version 1.15, 2009/06/28 14:22:04
|
Line 61 if (-e '/etc/redhat-release') {
|
Line 61 if (-e '/etc/redhat-release') {
|
warn('Unable to interpret /etc/redhat-release '. |
warn('Unable to interpret /etc/redhat-release '. |
'to determine system type'); |
'to determine system type'); |
} |
} |
|
} elsif (-e '/etc/issue') { |
|
open(IN,'</etc/issue'); |
|
my $versionstring=<IN>; |
|
chomp($versionstring); |
|
close(IN); |
|
if ($versionstring =~ /^Ubuntu (\d+)\.\d+/i) { |
|
$dist = 'ubuntu'.$1; |
|
} elsif ($versionstring =~ /^Debian\s+GNU\/Linux\s+(\d+)\.\d+/i) { |
|
$dist = 'debian'.$1; |
|
} elsif (-e '/etc/debian_version') { |
|
open(IN,'</etc/debian_version'); |
|
my $version=<IN>; |
|
chomp($version); |
|
close(IN); |
|
if ($version =~ /^(\d+)\.\d+\.?\d*/) { |
|
$dist='debian'.$1; |
|
} else { |
|
warn('Unable to interpret /etc/debian_version '. |
|
'to determine system type'); |
|
} |
|
} else { |
|
warn('Unable to interpret /etc/issue '. |
|
'to determine system type'); |
|
} |
} elsif (-e '/etc/debian_version') { |
} elsif (-e '/etc/debian_version') { |
open(IN,'</etc/debian_version'); |
open(IN,'</etc/debian_version'); |
my $version=<IN>; |
my $version=<IN>; |
chomp($version); |
chomp($version); |
close(IN); |
close(IN); |
if ($version eq '2.2') { |
if ($version =~ /^(\d+)\.\d+\.?\d*/) { |
$dist='debian2.2'; |
$dist='debian'.$1; |
|
} else { |
|
warn('Unable to interpret /etc/debian_version '. |
|
'to determine system type'); |
} |
} |
} elsif (-e '/etc/SuSE-release') { |
} elsif (-e '/etc/SuSE-release') { |
open(IN,'</etc/SuSE-release'); |
open(IN,'</etc/SuSE-release'); |