]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Cope with duplicate entries in /etc/openafs/CellServDB. This shouldn't
authorRuss Allbery <rra@debian.org>
Thu, 18 Aug 2005 19:12:03 +0000 (19:12 +0000)
committerRuss Allbery <rra@debian.org>
Thu, 18 Aug 2005 19:12:03 +0000 (19:12 +0000)
happen in practice, but if it does for some reason, it's easy to avoid
making it a problem.

debian/afs-rootvol

index 93437bba4bff675e737063408264c1621303a44e..84e61c615d4ed08ae08f1d851bc0c854d86f2b75 100644 (file)
@@ -125,13 +125,15 @@ if ($dynroot) {
 run("fs sa $rootmnt system:anyuser rl");
 
 # Scan CellServDB and create the cell mount points for every cell found there.
+# Force these commands to succeed, since it's possible to end up with
+# duplicate entries in CellServDB (and the second fs mkm will fail).
 open(CELLSERVDB, "/etc/openafs/CellServDB")
     or die "Unable to open /etc/openafs/CellServDB: $!\n";
 while (<CELLSERVDB>) {
     chomp;
     if (/^>\s*([a-z0-9_\-.]+)/) {
-        run("fs mkm $rootmnt/$1 root.cell -cell $1 -fast");
-        unwind("fs rmm $rootmnt/$1");
+        run("fs mkm $rootmnt/$1 root.cell -cell $1 -fast || true");
+        unwind("fs rmm $rootmnt/$1 || true");
     }
 }