#!/bin/perl
#
#  Simple test that uses uname to determine what we're running on...
#

sub determine_os {

print "Determining OS (in determine_os())\n" if $verbose;

# chop($SYSTEM=`(uname -s) 2>/dev/null`);
# chop($RELEASE=`(uname -r) 2>/dev/null`);

chop($SYSTEM = &command_to_string($UNAME, "-s"));
chop($RELEASE = &command_to_string($UNAME, "-r"));

$OS = "$SYSTEM.$RELEASE";

if    ($OS =~ /FreeBSD.2/){ $OS = "FREEBSD2"; }
elsif ($OS =~ /FreeBSD.3/){ $OS = "FREEBSD3"; }
elsif ($OS =~ /OpenBSD.2/){ $OS = "OPENBSD2"; }
elsif ($OS =~ /BSD\/OS.2/){ $OS = "BSDI2"; }
elsif ($OS =~ /BSD\/OS.3/){ $OS = "BSDI3"; }
elsif ($OS =~ /SunOS.4/)  { $OS = "SUNOS4"; }
elsif ($OS =~ /SunOS.5/)  { $OS = "SUNOS5"; }
elsif ($OS =~ /Linux.2/)  { $OS = "LINUX2"; }
elsif (!$OS)              { $OS = "unknown operating system"; }
else                      { $OS = $OS; }

# return $OS;
}

# print &determine_os() . "\n" unless ($running_under_grave_robber);

1;

