This file is indexed.

postinst is in uprecords-cgi 1:0.3.17-4.

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

set -e

. /usr/share/debconf/confmodule

db_version 2.0

if [ "$1" = "configure" ]; then
	if [ -f /usr/lib/cgi-bin/uprecords.conf \
		-o -f /usr/lib/cgi-bin/uprecords.header \
		-o -f /usr/lib/cgi-bin/uprecords.footer ]; then
		echo -n 'Moving config files:'
		for i in uprecords.conf uprecords.header uprecords.footer; do
			if [ -f /usr/lib/cgi-bin/$i ]; then
				echo -n " $i"
				mv /usr/lib/cgi-bin/$i /etc/uprecords-cgi
			fi
		done
		echo '.'
	fi

	TEMPFILE=`mktemp /tmp/debconfXXXXXX`
	db_get 'uprecords-cgi/layout'
	LAYOUT=$RET
	db_get 'uprecords-cgi/maxentries'
	MAXENTRIES=$RET
	if [ -z "$LAYOUT" -o -z "$MAXENTRIES" ]; then
		echo >&2 "Error: Some variables unset in Debconf database"
		exit 1
	fi
	sed	-e "s/^LAYOUT=.*/LAYOUT=$LAYOUT/" \
		-e "s/^SHOW_MAX=.*/SHOW_MAX=$MAXENTRIES/" \
		</etc/uprecords-cgi/uprecords.conf >$TEMPFILE
	# Now see if anything has changed
	if diff /etc/uprecords-cgi/uprecords.conf $TEMPFILE >/dev/null; then
		rm $TEMPFILE
	else
		mv /etc/uprecords-cgi/uprecords.conf \
			/etc/uprecords-cgi/uprecords.conf.dpkg-old
		mv $TEMPFILE /etc/uprecords-cgi/uprecords.conf
	fi
	# Now test whether "nobody" can read the config files (this
	# is necessary for the CGI script to work)
	for i in uprecords.conf uprecords.footer uprecords.header; do
	    if [ -x /etc/uprecords-cgi/$i  ]; then
		if su nobody -s /bin/sh -c 'test ! -r /etc/uprecords-cgi/'$i; then
			echo "Making $i world readable"
			chmod o+r /etc/uprecords-cgi/$i
		fi
	    fi
	done
fi