prerm is in mksh 56c-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 | #!/bin/sh
set -e
# This maintainer script can be called the following ways:
#
# * prerm "remove"
# * old-prerm "upgrade" $new_version
# * conflictors-prerm "remove" "in-favour" $package $new_version
# * deconfigureds-prerm "deconfigure" "in-favour"
# $package_being_installed $pbi_version ["removing"
# $conflicting_package $cp_version]
# The package and dependencies are at least Half-Installed; dependencies
# have previously been configured and not removed.
#
# * new-prerm "failed-upgrade" $old_version
# Called when 'old-prerm "upgrade"' fails; new package not unpacked, all
# other constraints the same as above.
case $1 in
remove|deconfigure)
update-alternatives --remove ksh /bin/mksh
update-alternatives --remove ksh /bin/mksh-static
# remove compatibility symlink if broken
test '!' -h /usr/bin/ksh || test -e /usr/bin/ksh || rm -f /usr/bin/ksh
remove-shell /bin/mksh
remove-shell /bin/mksh-static
;;
upgrade|failed-upgrade)
;;
*)
echo >&2 "prerm called with unknown subcommand '$1'"
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|