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)
#!/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