#!/usr/bin/perl
# YEAR=2002
my $dist='default';
if (-e '/etc/redhat-release') {
open(IN,'</etc/redhat-release');
my $versionstring=<IN>;
chomp($versionstring);
close(IN);
my $version=(split(/\s+/,$versionstring))[4];
if ($version=~/^7\./) {
$dist='redhat7';
} elsif ($version=~/^8\./) {
$dist='redhat8';
}
}
elsif (-e '/etc/debian_version') {
open(IN,'</etc/debian_version');
my $version=<IN>;
chomp($version);
close(IN);
if ($version eq '2.2') {
$dist='debian2.2';
}
}
else {
warn('Unknown installation filesystem; expecting debian version 2.2 '.
'or redhat 6.* or 7.*');
}
print $dist;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>