This file is indexed.

postinst is in mksh 40.4-3.

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
#!/bin/sh
# $MirOS: contrib/hosted/tg/deb/mksh/debian/mksh.postinst,v 1.7 2011/11/19 22:41:03 tg Exp $

set -e

# This maintainer script can be called the following ways:
#
# * new-postinst "configure" [$most_recently_configured_version]
# The package is unpacked; all dependencies are unpacked and, when there
# are no circular dependencies, configured.
#
# * old-postinst "abort-upgrade" $new_version
# * conflictors-postinst "abort-remove" "in-favour" $package
#	$new_version
# * postinst "abort-remove"
# * deconfigureds-postinst "abort-deconfigure" "in-favour"
#	$failed_install_package $fip_version ["removing"
#	$conflicting_package $cp_version]
# The package is unpacked; all dependencies are at least Half-Installed,
# previously been configured, and not removed. In some error situations,
# dependencies may not be even fully unpacked.
#
# * postinst "triggered" "${triggers[*]}"
# For trigger-only calls, i.e. if "configure" is not called.

# remove debconf data from old versions of this package
if test -e /bin/mksh.dropdebconf; then
	set +e
	echo purge | debconf-communicate mksh >/dev/null 2>&1
	rm -f /bin/mksh.dropdebconf
	set -e
fi

case $1 in
configure)
	update-alternatives --install /bin/ksh ksh /bin/mksh 12 \
	    --slave /usr/bin/ksh usr.bin.ksh /bin/mksh \
	    --slave /usr/share/man/man1/ksh.1.gz ksh.1.gz \
	    /usr/share/man/man1/mksh.1.gz
	update-alternatives --install /bin/ksh ksh /bin/mksh-static 11 \
	    --slave /usr/bin/ksh usr.bin.ksh /bin/mksh-static \
	    --slave /usr/share/man/man1/ksh.1.gz ksh.1.gz \
	    /usr/share/man/man1/mksh.1.gz
	add-shell /bin/mksh
	add-shell /bin/mksh-static
	;;

abort-upgrade|abort-remove|abort-deconfigure)
	;;

triggered)
	;;

*)
	echo >&2 "postinst called with unknown subcommand '$1'"
	exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section


exit 0