From ce13e3a56e3d85fd4c1a955fe45117263ed64cb4 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 18 Aug 2005 19:12:03 +0000 Subject: [PATCH] Cope with duplicate entries in /etc/openafs/CellServDB. This shouldn't happen in practice, but if it does for some reason, it's easy to avoid making it a problem. --- debian/afs-rootvol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/afs-rootvol b/debian/afs-rootvol index 93437bba4..84e61c615 100644 --- a/debian/afs-rootvol +++ b/debian/afs-rootvol @@ -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 () { 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"); } } -- 2.39.5