Commit f14af754 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor cleanup, to use routines in OSinfo. This script needs a total

redo.
parent d69967c7
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# Copyright (c) 2000-2009 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -145,11 +145,14 @@ foreach my $node (@nodes) {
my $nodeobject = Node->Lookup($node);
fatal("Could not map $node to its object")
if (!defined($nodeobject));
$osid = TBResolveNextOSID($nodeobject->default_osid());
my $osinfo = OSinfo->Lookup($osid);
fatal("Improper DB entry for OSID: $osid")
my $osinfo = OSinfo->Lookup($nodeobject->default_osid());
fatal("Could not map default_osid to its object for $node")
if (!defined($osinfo));
$opmode = $osinfo->op_mode();
my $nextosinfo = $osinfo->ResolveNextOSID();
fatal("Could not resolve nextosid for $osinfo")
if (!defined($nextosinfo));
$osid = $nextosinfo->osid();
$opmode = $nextosinfo->op_mode();
}
# Why? When will this happen?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment