Annotation of loncom/build/distprobe, revision 1.2
1.1 harris41 1: #!/usr/bin/perl
2:
3: # YEAR=2002
4:
5: my $dist='default';
6: if (-e '/etc/redhat-release') {
7: open(IN,'</etc/redhat-release');
8: my $versionstring=<IN>;
9: chomp($versionstring);
10: close(IN);
11: my $version=(split(/\s+/,$versionstring))[4];
12: if ($version=~/^7\./) {
13: $dist='redhat7';
14: }
15: }
16: elsif (-e '/etc/debian_version') {
17: open(IN,'</etc/debian_version');
18: my $version=<IN>;
19: chomp($version);
20: close(IN);
21: if ($version eq '2.2') {
22: $dist='debian2.2';
23: }
24: }
25: else {
26: warn('Unknown installation filesystem; expecting debian version 2.2 '.
27: 'or redhat 6.* or 7.*');
28: }
29: print $dist;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>