3 # Summary of how this script can be called:
5 # * <postinst> `configure' <most-recently-configured-version>
6 # * <old-postinst> `abort-upgrade' <new version>
7 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
9 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
10 # <failed-install-package> <version> `removing'
11 # <conflicting-package> <version>
17 update-alternatives --install /usr/bin/pagsh pagsh \
18 /usr/bin/pagsh.openafs 100 \
19 --slave /usr/share/man/man1/pagsh.1.gz pagsh.1.gz \
20 /usr/share/man/man1/pagsh.openafs.1.gz
22 test -d /afs || mkdir /afs
24 . /usr/share/debconf/confmodule
27 db_get openafs-client/thiscell
28 echo $RET >/etc/openafs/ThisCell
31 if test -f /etc/openafs/CellServDB ; then
34 cp /usr/share/openafs/CellServDB /etc/openafs
37 # If ThisCell is not in CellServDB, we have to prompt the user for the
38 # VLDB servers. Unfortunately, we can't do this in config because we
39 # need the CellServDB file, which is part of the package. We have to
40 # override a lintian warning for this since prompts at installation time
42 if grep -q -F "$RET" /etc/openafs/CellServDB && [ "x$RET" != "x" ] ; then
45 db_input critical openafs-client/cell-info || true
46 db_input high openafs-client/run-client || true
48 db_get openafs-client/cell-info
49 if [ "x$RET" != "x" ] ; then
50 echo \>$THISCELL > /etc/openafs/CellServDB.new
51 perl -MSocket -e 'foreach (@ARGV) {' \
52 -e '@a=gethostbyname($_) and ' \
53 -e 'printf("%s\t\t# %s\n",inet_ntoa($a[4]),$a[0]) }' $RET \
54 >>/etc/openafs/CellServDB.new
55 if [ `wc -l </etc/openafs/CellServDB.new` -eq 1 ] ; then
56 echo None of the hostnames resolved to an address 2>&1
57 db_reset openafs-client/cell-info || true
60 cat /etc/openafs/CellServDB.new /etc/openafs/CellServDB \
61 >/etc/openafs/CellServDB.tmp
62 mv /etc/openafs/CellServDB.tmp /etc/openafs/CellServDB
63 rm /etc/openafs/CellServDB.new
67 db_get openafs-client/cachesize
68 echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo
70 db_get openafs-client/run-client
71 echo AFS_CLIENT=$RET >/etc/openafs/afs.conf.client
72 db_get openafs-client/afsdb
73 echo AFS_AFSDB=$RET >>/etc/openafs/afs.conf.client
74 db_get openafs-client/crypt
75 echo AFS_CRYPT=$RET >>/etc/openafs/afs.conf.client
76 db_get openafs-client/dynroot
77 echo AFS_DYNROOT=$RET >>/etc/openafs/afs.conf.client
78 db_get openafs-client/fakestat
79 echo AFS_FAKESTAT=$RET >>/etc/openafs/afs.conf.client
82 abort-upgrade|abort-remove|abort-deconfigure)
86 echo "postinst called with unknown argument '$1'" >&2
91 # dh_installdeb will replace this with shell code automatically
92 # generated by other debhelper scripts.