File: mksh.prerm

package info (click to toggle)
mksh 40.9.20120630-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,288 kB
  • sloc: ansic: 39,060; sh: 3,812; perl: 1,018; makefile: 158
file content (38 lines) | stat: -rw-r--r-- 1,009 bytes parent folder | download
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
#!/bin/sh
# $MirOS: contrib/hosted/tg/deb/mksh/debian/mksh.prerm,v 1.9 2012/06/06 22:56:56 tg Exp $

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-shell /bin/mksh
	remove-shell /bin/mksh-static
	;;

upgrade|failed-upgrade)
	;;

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

exit 0