This file is indexed.

postinst is in pdnsd 1.2.8-par-2.2.

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
#!/bin/bash
set -e

default_set_var() {
    sed -i -e "s/^\s*${1}\s*=\s*[^#]*/${1}=${2}/" /etc/default/pdnsd
}

if test "$1" = "configure"; then
    . /usr/share/debconf/confmodule
    db_version 2.0
    db_title pdnsd

    db_get pdnsd/conf || true
    case "$RET" in
        "Use resolvconf")
            default_set_var START_DAEMON yes
            default_set_var AUTO_MODE    resolvconf
            ;;
        "Use root servers")
            default_set_var START_DAEMON yes
            default_set_var AUTO_MODE    recurse
            ;;
        *)
            default_set_var AUTO_MODE    ""
            ;;
    esac

    db_stop

    if ! getent passwd pdnsd > /dev/null; then
        adduser --quiet --system --ingroup proxy --no-create-home --home /var/cache/pdnsd pdnsd
    fi

    if [ ! -f /var/cache/pdnsd/pdnsd.cache ];then
        dd if=/dev/zero of=/var/cache/pdnsd/pdnsd.cache bs=1 count=4 2> /dev/null
    fi

    chown -R pdnsd:proxy /var/cache/pdnsd
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/pdnsd" ]; then
	if [ ! -e "/etc/init/pdnsd.conf" ]; then
		update-rc.d pdnsd start 20 2 3 4 5 . stop 80 0 1 6 . >/dev/null
	fi
	invoke-rc.d pdnsd start || exit $?
fi
# End automatically added section


exit 0