]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Don't add CellServDB records if AFSDB is in use
authorRuss Allbery <rra@debian.org>
Fri, 26 Mar 2010 19:25:01 +0000 (12:25 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 6 Apr 2010 21:12:56 +0000 (14:12 -0700)
* If the user configures openafs-client to use AFSDB records for VLDB
  server location, don't prompt the user for VLDB servers for the local
  cell even if they're not present in CellServDB and don't try to add an
  entry for the local cell to CellServDB.  (Closes: #575299)

debian/openafs-client.postinst

index ca3fdf4e537ece4704abdc4104fbc65f253d144a..f299168179dcb122d90f9548a240bb2ce7e7d4ab 100644 (file)
@@ -30,10 +30,15 @@ if [ "$1" = configure ] || [ "$1" = reconfigure ] ; then
     # If ThisCell is not in CellServDB, we have to prompt the user for the
     # VLDB servers.  Unfortunately, we can't do this in config because we
     # need the CellServDB file, which is part of the package.
+    #
+    # If the user is using afsdb for cell location, don't worry about
+    # prompting them for cells for their local system.
+    db_get openafs-client/afsdb
+    afsdb="$RET"
     if grep -q -F "$THISCELL" /etc/openafs/CellServDB \
            && [ "x$THISCELL" != "x" ] ; then
         :
-    else
+    elif [ x"$afsdb" != xtrue ] ; then
         db_input critical openafs-client/cell-info || true
         db_input high openafs-client/run-client || true
         db_go
@@ -70,8 +75,7 @@ EOF
 
     db_get openafs-client/run-client
     echo AFS_CLIENT="$RET" > /etc/openafs/afs.conf.client
-    db_get openafs-client/afsdb
-    echo AFS_AFSDB="$RET" >> /etc/openafs/afs.conf.client
+    echo AFS_AFSDB="$afsdb" >> /etc/openafs/afs.conf.client
     db_get openafs-client/crypt
     echo AFS_CRYPT="$RET" >> /etc/openafs/afs.conf.client
     db_get openafs-client/dynroot