Commit 9356ca57 authored by Leigh Stoller's avatar Leigh Stoller

Forget that we have to copy the sig file over too.

parent 1bd81403
......@@ -147,6 +147,8 @@ if ($UID && !$user->IsAdmin()) {
my $updatepath = 0;
my $copytofile = undef;
my $copyfromfile = undef;
my $copyfromsig = undef;
my $copytosig = undef;
my $version0;
#
......@@ -179,10 +181,14 @@ if ($version0->path() =~ /^\/usr\/testbed/) {
$copyfromfile = "$PROJROOT/" .
$image->pid() . "/images/" . basename($image->path());
}
$copytosig = $copytofile . ".sig";
$copyfromsig = $copyfromfile . ".sig";
}
if (defined($copytofile)) {
unlink($copytofile)
if (-e $copytofile);
unlink($copytosig)
if (-e $copytosig);
if (!$quiet) {
print "Copying ${FSNODE}:$copyfromfile $copytofile\n";
......@@ -192,6 +198,13 @@ if (defined($copytofile)) {
$image->Unlock();
fatal("Failed to scp ${FSNODE}:$copyfromfile $copytofile");
}
if (-e $copyfromsig) {
system("$SUDO $SCP -p ${FSNODE}:$copyfromsig $copytosig");
if ($?) {
$image->Unlock();
fatal("Failed to scp ${FSNODE}:$copyfromsig $copytosig");
}
}
if ($updatepath) {
if ($image->Update({"path" => $copytofile})) {
$image->Unlock();
......
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