FWIW, I just added a driver script, "scripts/OCA-driver.pl", that just tries to load the OS_Detect framework. I had on my HD during testing and
just decided it might be helpful in general.  Basically Jeff's notes in an
executable script.
--tjn

 _________________________________________________________________________
  Thomas Naughton                                      [EMAIL PROTECTED]
  Research Associate                                   (865) 576-4184


On Sat, 23 Jul 2005, Ram Kumar DANGETI wrote:

Please dont consider my previous request. That was a quick trail. Anyway I
just went through the entire code and the following is the output on my
debian machine(after slight modifications in code) . Now that OS_Detect is
in place, I think its time for me to work on some other debian components.
Is there any tentative list of components that that were already discussed
and are in the todo list ?
--- DEBUG OS_Detect--
Fedora.pm <http://Fedora.pm> did not return a true value at (eval 1) line 3.
RedHat.pm did not return a true value at (eval 2) line 3.
**DEBUG**
OCA::OS_Detect::Debian
os = Linux
arch = i686
os_release = 2.6.12
linux-distro = Debian
linux-distro-version = 3.1
Undefined subroutine &main::Dumper called at ./test line 14.


On 7/23/05, Ram Kumar DANGETI <[EMAIL PROTECTED]> wrote:
I just tried to use the following code snippet provided by Mr.
Jeff and ended up with the following error:
Can't use an undefined value as an ARRAY reference at
OSCAR/OCA/OS_Detect.pm line 40.
It will be great if some one can provide me a complete example
script which can show the exact usage of this module.
Could be useful for the oscar debian port.
Thnakyou.
-----
# Call the OS_Detect framework to find a suitable component.
# This only needs to happen *once*.
die "Cannot continue\n"
if (! OSCAR::OCA::OS_Detect::open());

# Call the selected component to get this platform"s info.
# This can be called many times throughout the OSCAR code (it"s fast).
my $ident = $OS_Detect->{query}();
print Dumper($ident);
-----

On 7/22/05, Bernard Li <[EMAIL PROTECTED]> wrote:
1. Can I checkout the OS_Detect sources ?

Yes, it's available here as well:

http://svn.oscar.openclustergroup.org/oscar/trunk/lib/OSCAR/OCA/

2. Which parts of the current OSCAR distribution is OS_Detect
going to replace?

Off the top of my head: Distro.pm <http://Distro.pm>, oda's setup
script, DepMan/PackMan,
generic-setup script, etc....

3. Just in brief, what will be the main job of this framework ?

As Mike has mentioned, this will be central framework for answering the
question 'What Operating System am I running?'

4. For which OSCAR distribution this is being planned ?

All supported distributions.

Cheers,

Bernard





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to