Commit 5d952a85 authored by Leigh Stoller's avatar Leigh Stoller

Update the Image Server (when appropriate) after changing image

permissions.
parent 62f142b7
#!/usr/bin/perl -w
#
# Copyright (c) 2003-2016 University of Utah and the Flux Group.
# Copyright (c) 2003-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -80,7 +80,9 @@ if ($UID == 0) {
#
# Configure variables
#
my $TB = "@prefix@";
my $TB = "@prefix@";
my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $POSTIMAGEDATA = "$TB/sbin/protogeni/postimagedata";
#
# Testbed Support libraries
......@@ -94,6 +96,7 @@ use Project;
use Group;
use User;
use OSImage;
use libEmulab;
#
# Turn off line buffering on output
......@@ -277,6 +280,16 @@ else {
or fatal("Could not update protogeni flag");
}
}
if ($PGENISUPPORT &&
GetSiteVar("protogeni/use_imagetracker")) {
my $imageid = $image->imageid();
print "Posting image $imageid to the image server ...\n";
system("$POSTIMAGEDATA $imageid");
if ($?) {
print STDERR "Could not post alias to the image server\n";
}
}
exit(0);
sub fatal($)
......
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