May I suggest considering the use of "whatami" for determining
platform?  It is tool that was developed as a simple cross platform
utility for just this purpose, and is in wide use on the TeraGrid and
elsewhere.

You can find it here:

   ftp://ftp.mcs.anl.gov/pub/systems/software/whatami-2.2.3.tar.bz2

Cheers, -Brian



Thus spake Brian Elliott Finley ([EMAIL PROTECTED]):
Send whatami


--------------------------
Brian Elliott Finley
Linux Strategist, CIS
Desk: 630.252.4742
Mobile: 630.631.6621
-----Original Message-----
From: [EMAIL PROTECTED]
To: [email protected]
Sent: Fri Oct 28 00:09:26 2005
Subject: [Oscar-devel] generic-setup

In the distroname subroutine, there is code to translate distro names - is this 
really necessary?  Shouldn't this information come straight from the OS_Detect 
framework?

I am attaching the relevant code snippet here:

sub distroname {
   my ($name, $ver);
   # override distro detection
   if ($options{distro}) {
       ($name, $ver) = split /-/, $options{distro};
   } else {
       $name = $os->{linux_distro};
       $ver = $os->{linux_distro_version};
       # translate distro names
       if ($name eq "redhat-el-as" || $name eq "redhat-el-es" || $name eq "redh
at-el-ws") {
           $name = "rhel";
       } elsif ($name eq "fedora") {
           $name = "fc";
       } elsif ($name eq "mandrake") {
           $name = "mdk";
       }
   }
   return ($name,$ver);
}

Cheers,

Bernard

--
Brian Elliott Finley
Mobile:  630.631.6621


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to