Debian Codegraph @

debian/firebird4.0-server.postinst

raw
1 #!/bin/sh
2 # postinst script for firebird4.0-server
3
4 set -e
5 . /usr/share/debconf/confmodule
6 set -u
7
8 if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
9 set -x
10 fi
11 # summary of how this script can be called:
12 # * <postinst> `configure' <most-recently-configured-version>
13 # * <old-postinst> `abort-upgrade' <new version>
14 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
15 # <new-version>
16 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
17 # <failed-install-package> <version> `removing'
18 # <conflicting-package> <version>
19 # for details, see http://www.debian.org/doc/debian-policy/ or
20 # the debian-policy package
21 #
22 # quoting from the policy:
23 # Any necessary prompting should almost always be confined to the
24 # post-installation script, and should be protected with a conditional
25 # so that unnecessary prompting doesn't happen if a package's
26 # installation fails and the `postinst' is called with `abort-upgrade',
27 # `abort-remove' or `abort-deconfigure'.
28
29 FB_VER=4.0
30 . /usr/share/firebird${FB_VER}-common/functions.sh
31
32 checkFirebirdAccount() {
33 getent passwd firebird > /dev/null || \
34 adduser --system --quiet --home /var/lib/firebird \
35 --group --gecos "Firebird Database Administator" firebird
36 }
37
38 debhelper_hook()
39 {
40 # This is here in order to make debhelper_hook() a valid
41 # shell procedure in the case when debhelper has nothing
42 # for us
43 DuMmYnOtUsEd="dummy"
44
45 set +u
46 #DEBHELPER#
47 set -u
48 }
49
50
51 case "$1" in
52 configure)
53 checkFirebirdAccount
54
55 firebird_config_postinst "$@"
56 ;;
57
58 *)
59 debhelper_hook "$@"
60 ;;
61 esac
62
63 exit 0
64
65 # vi: set sw=4 ts=8 filetype=sh sts=4 :