This file is indexed.

postinst is in telnetd 0.17-36.

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
#!/bin/sh -e
# $Id: telnetd.postinst,v 1.15 2003/10/24 12:52:18 herbert Exp $

update_inetd_entry() {
	if [ $2 ]; then
		update-inetd --remove ".*telnet"
		update-inetd --group STANDARD --add "$telnetdent"
	else
		update-inetd --remove ".*telnet"
		update-inetd --group STANDARD --add "$rootent"
	fi
}

if ! id -u telnetd >/dev/null 2>&1; then
	if sg telnetd -c true 2>/dev/null; then
		adduser --quiet --no-create-home --disabled-password --system --ingroup telnetd --home /nonexistent telnetd
	else
		adduser --quiet --no-create-home --disabled-password --system --group --home /nonexistent telnetd
	fi
fi
adduser --quiet telnetd utmp

if [ -z "$(dpkg-statoverride --list /usr/lib/telnetlogin)" ]; then
	chown root:telnetd /usr/lib/telnetlogin
	chmod 4754 /usr/lib/telnetlogin
fi

rootent="telnet		stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/in.telnetd"
telnetdent="telnet		stream	tcp	nowait	telnetd	/usr/sbin/tcpd	/usr/sbin/in.telnetd"

if egrep -q "^(devpts /dev/pts|devfs /dev) " /proc/mounts; then
	devpts=yes
else
	devpts=
fi

case "$1" in
abort-upgrade | abort-deconfigure | abort-remove)
	update-inetd --enable telnet
	;;
configure)
	if [ -z "$2" ] || 
       dpkg --compare-versions "$2" lt 0.17-13 ||
       fgrep -q telnetd-ssl /etc/inetd.conf
    then
		update_inetd_entry "$2" $devpts
	else
		update-inetd --enable telnet
	fi
	;;
*)
	printf "$0: incorrect arguments: $*\n" >&2
	exit 1
	;;
esac