From: Russ Allbery Date: Thu, 18 Aug 2005 19:12:03 +0000 (+0000) Subject: Cope with duplicate entries in /etc/openafs/CellServDB. This shouldn't X-Git-Tag: debian/1.4rc1-1~32 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ce13e3a56e3d85fd4c1a955fe45117263ed64cb4;p=packages%2Fo%2Fopenafs.git 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. --- 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"); } }