This file is indexed.

postinst is in rlinetd 0.9.1-1.

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
# vim:ts=4:sts=4

set -e

INETD_SCR="/etc/init.d/inetd"
INETD_CONF="/etc/inetd.conf"
RLINCONFDIR="/etc/rlinetd.d/"
UCFDIR="/var/lib/rlinetd/ucf/"


divert()
{
	if ! LC_ALL=C dpkg-divert --list "$1$2" | grep -q diversion; then
		dpkg-divert --package rlinetd --quiet --rename --add \
			--divert "$1.real$2" "$1$2"
	fi
}

undivert()
{
	if LC_ALL=C dpkg-divert --list "$1$2" | grep -q 'diversion.*rlinetd'; then
		if [ -f "$1$2" ] ; then
			echo "WARNING: saving $1$2 as $1$2.saved_by_rlientd" 1>&2
			mv -f "$1$2" "$1$2.saved_by_rlientd"
		fi
		dpkg-divert --package rlinetd --quiet --rename --remove \
			--divert "$1.real$2" "$1$2"
	fi
}


if [ "$1" = "configure" ]; then
	if [ -f "$INETD_CONF" ] && [ -z "`ls -1 $UCFDIR`" ]; then

		# source debconf library
		. /usr/share/debconf/confmodule
		db_get rlinetd/convert_from_inetd
		if [ "x$RET" = "xtrue" ] ; then
			inetd2rlinetd --add-from-comment -f "$INETD_CONF" "$RLINCONFDIR"
		fi

		inetd2rlinetd --add-from-comment --force-overwrite -f "$INETD_CONF" "$UCFDIR"

		db_stop
	fi

	if dpkg --compare-versions "0.6.1-2" gt-nl "$2" ; then
		if [ -f "$INETD_SCR" ] ; then
			if grep -q 'has been diverted by the rlinetd' "$INETD_SCR"; then
				rm -f "$INETD_SCR"
			fi
		fi
		undivert "$INETD_SCR"
	fi

fi

# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/rlinetd" ]; then
		update-rc.d rlinetd defaults >/dev/null
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		invoke-rc.d rlinetd $_dh_action || exit $?
	fi
fi
# End automatically added section