Commit 43486a6d authored by Leigh Stoller's avatar Leigh Stoller

Add -a option, which to pass along to newimageid_ez, which creates the

type mappings for all existing pc types.
parent 0a2544c8
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2007-2010 University of Utah and the Flux Group.
# Copyright (c) 2007-2012 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -16,12 +16,13 @@ use Data::Dumper;
#
sub usage()
{
print STDOUT "Usage: load-descriptors [-f] filename\n";
print STDOUT "Usage: load-descriptors [-f] [-a] filename\n";
exit(-1);
}
my $optlist = "df";
my $optlist = "dfa";
my $force = 0;
my $debug = 0;
my $alltypes= 0;
#
# These are the OSIDs that are used to populate the osidtoimageid table
......@@ -84,6 +85,9 @@ if (! getopts($optlist, \%options)) {
if (defined($options{"d"})) {
$debug = 1;
}
if (defined($options{"a"})) {
$alltypes = 1;
}
if (defined($options{"f"})) {
$force = 1;
}
......@@ -181,7 +185,7 @@ foreach my $osname (keys(%osinfos)) {
foreach my $imagename (keys(%images)) {
my ($xmlparse, $string) = @{ $images{$imagename} };
my $ezid = exists($xmlparse->{'attribute'}->{"OS"});
my $which = ($ezid ? $NEWIMAGE_EZ : $NEWIMAGE);
my $which = ($ezid ? "$NEWIMAGE_EZ -a " : $NEWIMAGE);
next
if (! $ezid);
......
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