This file is indexed.

postinst is in fts 1.1-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
52
53
54
#!/bin/sh
set -e

case "$1" in
	configure|reconfigure)

	. /usr/share/debconf/confmodule
	db_version 2.0
	db_get "fts/tftppath"
	tftppath="$RET"
	
	# Create user
        if ! getent passwd tftpd >/dev/null; then
            adduser --disabled-password \
                    --quiet --system \
                    --home $tftppath \
                    --no-create-home \
                    --gecos "TFTP account" \
                    --group tftpd
        fi

	# Create pxelinux.cfg path
	[ ! -d "$tftppath/pxelinux.cfg" ] && mkdir -p "$tftppath/pxelinux.cfg"
	
	# Create pxelinux.static path
	[ ! -d "$tftppath/pxelinux.static" ] && mkdir -p "$tftppath/pxelinux.static"

	# Create a safe default file
	#if [ ! -f "$tftppath/pxelinux.static/default" ]; then
	# 	echo "localboot 0" > "$tftppath/pxelinux.static/default"
	#fi

	# Apply to config
	sed -e "s~^path\s*=\s*/.*$~path = $tftppath/pxelinux.cfg~" \
		-e "s~^static-path\s*=\s*/.*$~static-path = $tftppath/pxelinux.static~" /usr/share/fts/config > /etc/fts/config.debconf-tmp
	ucf --three-way --debconf-ok /etc/fts/config.debconf-tmp /etc/fts/config
	ucfr fts /etc/fts/config
	rm -f /etc/fts/config.debconf-tmp || true
	;;
esac


# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
	pycompile -p fts 
fi

# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/fts" ]; then
	update-rc.d fts defaults >/dev/null
	invoke-rc.d fts start || exit $?
fi
# End automatically added section