]> andersk Git - moira.git/commitdiff
if an OldFiles mountpoint exists, update it too
authorjweiss <jweiss>
Sun, 7 Nov 1999 13:23:31 +0000 (13:23 +0000)
committerjweiss <jweiss>
Sun, 7 Nov 1999 13:23:31 +0000 (13:23 +0000)
incremental/afs_rename.pl

index 333d769b986c20ca075aae8aea1c1992fcaf840b..44a4c046f7805b9d926e40c4a8955ca78ba4897a 100644 (file)
@@ -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($_ = <FS>);
+    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);
 }
 
This page took 0.118038 seconds and 5 git commands to generate.