Commit 8bc8a1e3 authored by Leigh Stoller's avatar Leigh Stoller

Minor bug fix.

parent 17febf4d
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -1384,14 +1384,15 @@ foreach $node (@nodenames) {
my $ram = $typemap{$type}->{'RAM'};
my $trivspeed = $typemap{$type}->{'TRIVSPEED'};
my $uuid = $nodetouuid{$node};
my @types = ("$type:1")
if (!$sharing_mode{$node} || $current->is_subnode());
my @types = ();
my @sliver_types = ();
my @features = ();
my @flags;
my $needvirtgoo = 0;
@types = ("$type:1")
if (!$sharing_mode{$node} || $current->is_subnode());
my ($latitude, $longitude, $country);
# per-node override RAM.
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2017, 2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -37,13 +37,14 @@ sub usage()
" -d Enable debug messages\n".
" -p Purge the disk image file(s)\n".
" -r Rename the disk image file(s) instead (default)\n".
" -R Do not rename the disk image file(s)\n".
" -n Impotent mode, show what would be done.\n".
" -f Force deletion of system image\n".
" -V Delete only the version\n".
" -F Force deletion of global system image\n");
exit(-1);
}
my $optlist = "dFprnfV";
my $optlist = "dFprRnfV";
my $debug = 0;
my $purge = 0;
my $rename = 1;
......@@ -135,8 +136,6 @@ if (defined($options{"f"})) {
}
usage()
if (@ARGV != 1);
usage()
if (! ($purge || $rename));
my $imageid = shift(@ARGV);
my $image = OSImage->Lookup($imageid);
......@@ -453,6 +452,7 @@ if (!$versonly) {
$image->SchedIMSDeletion(1) == 0
or fatal("Could not schedule IMS deletion");
}
# XXX Mark updater so we know who deleted the image.
if ($image->Delete() != 0) {
fatal("Could not delete image!");
}
......@@ -466,6 +466,7 @@ else {
$image->SchedIMSDeletion(0) == 0
or fatal("Could not schedule IMS deletion");
}
# XXX Mark updater so we know who deleted the image.
if ($image->DeleteVersion() != 0) {
fatal("Could not delete image version!");
}
......
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