This file is indexed.

postinst is in apmd 3.2.2-14.

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
#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux apmd package
#
# Written by Dirk Eddelbuettel <edd@debian.org>
# Debconf changes added by Chris Hanson <cph@debian.org>

set -e 
umask 022

# Remove a no-longer used conffile
rm_conffile()
{
    CONFFILE="$1"

    if [ -e "$CONFFILE".dpkg-obsolete ]; then
        echo "Removing obsolete conffile $CONFFILE"
        rm -f "$CONFFILE".dpkg-obsolete
    fi
}

case "${1}" in
(configure)
    . /usr/share/debconf/confmodule || exit 0

    db_stop

    # Upgrade from intrepid
    if dpkg --compare-versions "$2" lt "3.2.2-12ubuntu2"; then
	rm_conffile /etc/apm/scripts.d/hwclock
	rm -f /etc/apm/suspend.d/99hwclock
	rm -f /etc/apm/resume.d/00hwclock
    fi

    # Remove shutdown and reboot links; this init script does not need them.
    if dpkg --compare-versions "$2" lt "3.2.2-7ubuntu1"; then
	rm -f /etc/rc0.d/K20apmd /etc/rc6.d/K20apmd
    fi

    # Update init scripts links
    if dpkg --compare-versions "$2" lt "3.2.2-12ubuntu3"; then
	update-rc.d -f apmd remove
    fi
    ;;
(abort-upgrade|abort-remove|abort-deconfigure)
    ;;
(*)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/apmd" ]; then
	update-rc.d apmd start 10 2 3 4 5 . stop 21 1 . >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d apmd start || exit $?
	else
		/etc/init.d/apmd start || exit $?
	fi
fi
# End automatically added section


exit 0