This file is indexed.

postinst is in di-netboot-assistant 0.38a.

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

STATUS_LIB=/var/lib/di-netboot-assistant
TFTP_ROOT=/var/lib/tftpboot

if [ -e /etc/di-netboot-assistant/di-netboot-assistant.conf ]; then
    . /etc/di-netboot-assistant/di-netboot-assistant.conf
fi


migrate_pxelinux_prefix() {
    echo 'Migrating current setup to use PXELinux "::/" (absolute TFTP path).'

    SEDCMD1='s,^\(\s*\(KERNEL\|APPEND\|include\|config\|menu background\|f[0-9]\)\s\+\)\(debian-installer\),\1::/\3,i'
    SEDCMD2='s,^\(\s*APPEND\s\+.*initrd=\)\([^:]\),\1::/\2,i'
    SEDCMD3='s,^\(\s*\(default\|display\)\s\+\)\([^:].*/\),\1::/\3,i'

    if [ -d "$STATUS_LIB" ]; then
	find $STATUS_LIB -name '*.pxelinux.menu.fragment' \
	  | xargs -r -n 1 \
	  sed -i -e "$SEDCMD1"
    fi

    if [ -d "$TFTP_ROOT/debian-installer" ]; then
	find $TFTP_ROOT/debian-installer -type f -a \( -name "default" -o -name "boot.txt" -o -name '*.cfg' \) \
	  | xargs -r -n 1 \
	  sed --in-place=.mig-bak -e "$SEDCMD1" -e "$SEDCMD2" -e "$SEDCMD3"
    fi
}

case "$1" in
    configure)
        oldver=$2
        if [ "$oldver" ] && dpkg --compare-versions "$2" lt 0.37; then
            migrate_pxelinux_prefix
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0