]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Fill in the server CellServDB with information about the local cell,
authorRuss Allbery <rra@debian.org>
Tue, 23 Aug 2005 06:19:31 +0000 (06:19 +0000)
committerRuss Allbery <rra@debian.org>
Tue, 23 Aug 2005 06:19:31 +0000 (06:19 +0000)
    if available in the client CellServDB, rather than always initializing
    it to contain just the name of the cell.

Also reformat openafs-fileserver.postinst to make it a bit easier to
read.

debian/changelog
debian/openafs-fileserver.postinst

index a18b233d990ffe59aecb6415cc97dcb3127c767a..525248e7ecb3c73ff54a0cd8fe7d173c96bd4f29 100644 (file)
@@ -7,6 +7,9 @@ openafs (1.3.87-2) unstable; urgency=low
     dynroot.  afs-newcell generates the server CellServDB directly to work
     around oddities with bos addhost.  Thanks to Fahemm Mitha and Sergio
     Gelato for analysis and patches.  (Closes: #322638)
+  * Fill in the server CellServDB with information about the local cell,
+    if available in the client CellServDB, rather than always initializing
+    it to contain just the name of the cell.
   * Detect AFS caches on non-ext2/ext3 file systems and abort AFS client
     initialization.  (Closes: #249315)
   * Don't create the unused /etc/openafs/AFSLog file.  (Closes: #120097)
index bc234b06f3829a36db5b6dbe68ef65d518f3002b..2c49fc3208db0b5ab9893ab6185e11ae76fdbe81 100644 (file)
@@ -1,48 +1,55 @@
 #!/bin/sh -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
+#
+# Summary of how this script can be called:
+#
+#  * <postinst> `configure' <most-recently-configured-version>
+#  * <old-postinst> `abort-upgrade' <new version>
+#  * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#    <new-version>
+#  * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#    <failed-install-package> <version> `removing'
+#    <conflicting-package> <version>
+
+set -e
 
 case "$1" in
-    configure)
-
-       . /usr/share/debconf/confmodule
-
-       db_version 2.0
-
-       db_get openafs-fileserver/thiscell
-       echo $RET >/etc/openafs/server/ThisCell
-       if [ -f /etc/openafs/server/CellServDB ] ; then :
-           else echo \>$RET >/etc/openafs/server/CellServDB
-           fi
-           if [ "x$2" != "x" ] ; then
-               if dpkg --compare-versions $2 lt 1.2.0-1 ; then
-                   mv /etc/openafs/server-local/BosConfig /etc/openafs/BosConfig ||true
-                   mv /etc/openafs/server-local/sysid /var/lib/openafs ||true
-                   fi
-               fi
-           db_stop
+configure)
+    . /usr/share/debconf/confmodule
+    db_version 2.0
+
+    db_get openafs-fileserver/thiscell
+    echo $RET >/etc/openafs/server/ThisCell
+
+    if [ -f /etc/openafs/server/CellServDB ] ; then
+        :
+    else
+        sed -n "/^>$RET/,/^>/p" /etc/openafs/CellServDB | sed '$d' \
+            >/etc/openafs/server/CellServDB
+        if [ ! -s /etc/openafs/server/CellServDB ] ; then
+            echo ">$RET" >/etc/openafs/server/CellServDB
+        fi
+    fi
+    if [ "x$2" != "x" ] ; then
+        if dpkg --compare-versions $2 lt 1.2.0-1 ; then
+            mv /etc/openafs/server-local/BosConfig \
+                /etc/openafs/BosConfig || true
+            mv /etc/openafs/server-local/sysid /var/lib/openafs || true
+        fi
+    fi
+    db_stop
     ;;
 
-    abort-upgrade|abort-remove|abort-deconfigure)
-
+abort-upgrade|abort-remove|abort-deconfigure)
     ;;
 
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 0
+*)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 0
     ;;
 esac
 
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
+# dh_installdeb will replace this with shell code automatically generated by
+# other debhelper scripts.
 #DEBHELPER#
 
 exit 0