From: jweiss Date: Sun, 7 Nov 1999 13:23:31 +0000 (+0000) Subject: if an OldFiles mountpoint exists, update it too X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/b7d3f65231405130f5b3c2a0f3c2d6c500b3d33c if an OldFiles mountpoint exists, update it too --- diff --git a/incremental/afs_rename.pl b/incremental/afs_rename.pl index 333d769b..44a4c046 100644 --- a/incremental/afs_rename.pl +++ b/incremental/afs_rename.pl @@ -76,6 +76,21 @@ if ($oldtype eq "AFS") { if ($newtype eq "AFS") { &run("$fs mkm $newpath $newvname"); push(@clean, "$fs rmm $newpath"); + $oldfilespath = $newpath . "/OldFiles"; + open(FS, "$fs lsm $oldfilespath|"); + chop($_ = ); + close(FS); + if (! $?) { + ($oldofvname = $_) =~ s/^.* volume '.(.*)'$/\1/; + $newofvname = $newvname . ".backup"; + &run("$fs sa $newpath sms all"); + push(@clean, "$fs sa $newpath sms none"); + &run("$fs rmm $oldfilespath"); + push(@clean, "$fs mkm $oldfilespath $oldofvname"); + &run("$fs mkm $oldfilespath $newofvname"); + push(@clean, "$fs rmm $oldfilespath"); + &run("$fs sa $newpath sms none"); + } &release_parent($newpath); }