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

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

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