Codebase list mksh / c2c8ccd0-6b9f-4bd1-be89-ba082e7f4561/main debian / mksh.postinst
c2c8ccd0-6b9f-4bd1-be89-ba082e7f4561/main

Tree @c2c8ccd0-6b9f-4bd1-be89-ba082e7f4561/main (Download .tar.gz)

mksh.postinst @c2c8ccd0-6b9f-4bd1-be89-ba082e7f4561/mainraw · history · blame

#!/bin/sh

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
# * old-postinst "abort-remove"
# * conflictors-postinst "abort-remove" "in-favour" $new_package
#	$new_version
# * deconfigureds-postinst "abort-deconfigure" "in-favour"
#	$failed_install_package $fip_version		# new-package
#	["removing" $conflicting_package $cp_version]	# old-package
# 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.
#
# * new-postinst "reconfigure" [$most_recently_configured_version](?)
# Treat this as just like "configure" for a future extension by debconf.

case $1 in
(configure|reconfigure)
	update-alternatives --install /bin/ksh ksh /bin/mksh 12 \
	    --slave /usr/share/man/man1/ksh.1.gz ksh.1.gz \
	    /usr/share/man/man1/mksh.1.gz \
	    --slave /bin/rksh rksh /bin/mksh \
	    --slave /usr/share/man/man1/rksh.1.gz rksh.1.gz \
	    /usr/share/man/man1/mksh.1.gz
	update-alternatives --install /bin/ksh ksh /bin/mksh-static 11 \
	    --slave /usr/share/man/man1/ksh.1.gz ksh.1.gz \
	    /usr/share/man/man1/mksh-static.1.gz \
	    --slave /bin/rksh rksh /bin/mksh-static \
	    --slave /usr/share/man/man1/rksh.1.gz rksh.1.gz \
	    /usr/share/man/man1/mksh-static.1.gz
	# create compatibility symlink if necessary
	test -e /usr/bin/ksh || test -h /usr/bin/ksh || \
	    ln -s /bin/ksh /usr/bin/ksh

	add-shell /bin/mksh
	add-shell /bin/mksh-static
	;;

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

(triggered)
	;;

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

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

#DEBHELPER#

exit 0