This file is indexed.

prerm is in firebird2.5-classic 2.5.4.26856.ds4-1build1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
# prerm script for firebird2.5-classic
#
# see: dh_installdeb(1)

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

set -e
. /usr/share/debconf/confmodule
set -u

FB_VER="2.5"
FB_FLAVOUR=classic
THIS="firebird$FB_VER-$FB_FLAVOUR"
. /usr/share/firebird$FB_VER-common/functions.sh

#---------------------------------------------------------------------
# stop server if it is running

checkIfClassicRunning()
{
    # Check to see who is holding locks if any
    # fb_lock_mgr naturally holds a lock and should be excluded
    LOCK_PIDS=`fb_lock_print | egrep "Process id:" | sed -e 's/.*Process id: *//' | sed -e 's/, UID:.*//'` || true

    if [ -n "$LOCK_PIDS" ] ;
    then
        Q=shared/firebird/server_in_use
        db_subst "$Q" FB_VER $FB_VER
        db_subst "$Q" FB_FLAVOUR $FB_FLAVOUR

        if [ "${1:-}" = "loud" ]; then
            db_input critical "$Q" || true
            db_go || true
        else
            db_metaget "$Q" Description

            echo "$RET"
        fi

        exit 1
    fi
}


case "$1" in
    remove|deconfigure|upgrade)
        checkIfClassicRunning loud
    ;;
    failed-upgrade)
        checkIfClassicRunning
    ;;
esac


# Automatically added by dh_installinit
if [ -x "/etc/init.d/firebird2.5-classic" ] || [ -e "/etc/init/firebird2.5-classic.conf" ]; then
	invoke-rc.d firebird2.5-classic stop || exit $?
fi
# End automatically added section


exit 0