This file is indexed.

postinst is in fts 0.2-1build1.

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
#!/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 | grep -q "tftpd"
	then
		adduser --group --system 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 default file
	if [ ! -f "$tftppath/pxelinux.static/default" ]; then
	 	echo "localboot 0" > "$tftppath/pxelinux.cfg/default"
	fi

	# Apply to config
	sed -i "s~^pxelinux_cfg=/.*$~pxelinux_cfg=$tftppath\/pxelinux.cfg~" /usr/share/doc/fts/fts.conf
	sed -i "s~^pxelinux_cfg_static=/.*$~pxelinux_cfg_static=$tftppath\/pxelinux.static~" /usr/share/doc/fts/fts.conf
	ucf --three-way --debconf-ok /usr/share/doc/fts/fts.conf /etc/fts/fts.conf
	;;
esac

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