This file is indexed.

postinst is in aide-common 0.16-3.

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
73
74
#!/bin/sh
#
# post-installation script for AIDE
# A whole lot of this is "borrowed" from tripwire's postinst
#

set -e

# We need debconf.
. /usr/share/debconf/confmodule

if [ -n "$AIDEDEBUG" ]; then
  echo "now debugging $0 $@"
  set -x
fi

PKGNAME="aide"

# Flags to be passed to aideinit
aideinitflags="-b"

# Make sure we should be running...
case "$1" in
    configure)
        # continue below
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
        ;;
    *)
        echo "postinst called with unknown argument "$1 >&2
        exit 0
        ;;
esac

# handle ucf-conffiles

. /usr/share/aide/ucf-helper-functions.sh
SRCDIR="/usr/share/$PKGNAME/config"
TRGDIR="/etc"

if dpkg --compare-versions "$2" le "0.16-1"; then
    # we're updating from a version earlier than 0.16-1, rename DHCP conffiles
    rename_ucf_file /etc/aide/aide.conf.d/31_aide_dhcp3-client /etc/aide/aide.conf.d/31_aide_isc-dhcp-client 
    rename_ucf_file /etc/aide/aide.conf.d/31_aide_dhcp3-server /etc/aide/aide.conf.d/31_aide_isc-dhcp-server 
fi
handle_all_ucf_files $SRCDIR $TRGDIR

db_get aide/aideinit
if [ "$RET" = "true" ]; then
	if [ -f "/var/lib/aide/aide.db.new" ]; then
		db_get aideinit/overwritenew
		if [ "$RET" = "true" ]; then
			aideinitflags="$aideinitflags -y"
		fi
	fi
	db_get aideinit/copynew
	if [ "$RET" = "true" ]; then
		aideinitflags="$aideinitflags -f"
	fi
	# generate configuration
	update-aide.conf
	# borrowed this trick from man-db
	# just making sure it actually ends up in the background...
	start-stop-daemon --start --background --pidfile /dev/null \
	--startas /usr/sbin/aideinit -- $aideinitflags
	db_set aide/aideinit false
fi



exit 0

# vim:sw=4:sts=4:et: