~ubuntu-branches/ubuntu/dapper/openafs/dapper

« back to all changes in this revision

Viewing changes to src/packaging/Debian/openafs-fileserver.postinst

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2006-04-15 15:47:04 UTC
  • Revision ID: package-import@ubuntu.com-20060415154704-xavpx3mx6bygfc3s
* Exit successfully in the openafs-client init script if no module is
  installed, since otherwise openafs-client will fail to install until
  one builds a module.  This restores previous accidental behavior due
  to a bug in debhelper.  (Closes: #362695)
* libopenafs-dev must conflict with liblwp-dev since they both provide
  liblwp.a.  Thanks, Justin Pryzby.  (Closes: #362842)
* openafs-client recommends lsof, since the init script uses it for
  cleaner shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh -e
 
2
#
 
3
# Summary of how this script can be called:
 
4
#
 
5
#  * <postinst> `configure' <most-recently-configured-version>
 
6
#  * <old-postinst> `abort-upgrade' <new version>
 
7
#  * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
8
#    <new-version>
 
9
#  * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
10
#    <failed-install-package> <version> `removing'
 
11
#    <conflicting-package> <version>
2
12
 
3
 
# summary of how this script can be called:
4
 
#        * <postinst> `configure' <most-recently-configured-version>
5
 
#        * <old-postinst> `abort-upgrade' <new version>
6
 
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
7
 
#          <new-version>
8
 
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
9
 
#          <failed-install-package> <version> `removing'
10
 
#          <conflicting-package> <version>
 
13
set -e
11
14
 
12
15
case "$1" in
13
 
    configure)
14
 
 
15
 
        . /usr/share/debconf/confmodule
16
 
 
17
 
        db_version 2.0
18
 
 
19
 
        db_get openafs-fileserver/thiscell
20
 
        echo $RET >/etc/openafs/server/ThisCell
21
 
        if [ -f /etc/openafs/server/CellServDB ] ; then :
22
 
            else echo \>$RET >/etc/openafs/server/CellServDB
23
 
            fi
24
 
            if [ "x$2" != "x" ] ; then
25
 
                if dpkg --compare-versions $2 lt 1.2.0-1 ; then
26
 
                    mv /etc/openafs/server-local/BosConfig /etc/openafs/BosConfig ||true
27
 
                    mv /etc/openafs/server-local/sysid /var/lib/openafs ||true
28
 
                    fi
29
 
                fi
30
 
    ;;
31
 
 
32
 
    abort-upgrade|abort-remove|abort-deconfigure)
33
 
 
34
 
    ;;
35
 
 
36
 
    *)
37
 
        echo "postinst called with unknown argument \`$1'" >&2
38
 
        exit 0
 
16
configure)
 
17
    . /usr/share/debconf/confmodule
 
18
    db_version 2.0
 
19
 
 
20
    db_get openafs-fileserver/thiscell
 
21
    echo $RET >/etc/openafs/server/ThisCell
 
22
 
 
23
    if [ -f /etc/openafs/server/CellServDB ] ; then
 
24
        :
 
25
    else
 
26
        sed -n "/^>$RET/,/^>/p" /etc/openafs/CellServDB | sed '$d' \
 
27
            >/etc/openafs/server/CellServDB
 
28
        if [ ! -s /etc/openafs/server/CellServDB ] ; then
 
29
            echo ">$RET" >/etc/openafs/server/CellServDB
 
30
        fi
 
31
    fi
 
32
    if [ "x$2" != "x" ] ; then
 
33
        if dpkg --compare-versions $2 lt 1.2.0-1 ; then
 
34
            mv /etc/openafs/server-local/BosConfig \
 
35
                /etc/openafs/BosConfig || true
 
36
            mv /etc/openafs/server-local/sysid /var/lib/openafs || true
 
37
        fi
 
38
    fi
 
39
    db_stop
 
40
    ;;
 
41
 
 
42
abort-upgrade|abort-remove|abort-deconfigure)
 
43
    ;;
 
44
 
 
45
*)
 
46
    echo "postinst called with unknown argument \`$1'" >&2
 
47
    exit 0
39
48
    ;;
40
49
esac
41
50
 
42
 
# dh_installdeb will replace this with shell code automatically
43
 
# generated by other debhelper scripts.
 
51
# dh_installdeb will replace this with shell code automatically generated by
 
52
# other debhelper scripts.
44
53
#DEBHELPER#
45
54
 
46
55
exit 0