File: pdksh.preinst

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 (50 lines) | stat: -rw-r--r-- 1,696 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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# $MirOS: contrib/hosted/tg/deb/mksh/debian/pdksh.preinst,v 1.4 2012/06/30 17:34:30 tg Exp $

set -e

# This maintainer script can be called the following ways:
#
# * new-preinst "install" [$old_version]
# * new-preinst "upgrade" [$old_version]
# * old-preinst "abort-upgrade" $new_version
# Essential packages and Pre-Depends are available. Pre-Depends have
# been configured once, but may be unpacked or Half-Configured only,
# or, for "abort-upgrade", Half-Installed if their upgrade failed.

case $1 in
install|upgrade)
	(update-alternatives --remove ksh /bin/pdksh || :)
	(remove-shell /bin/pdksh || :)
	;;

abort-upgrade)
	;;

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

#
# Due to switching the source package from pdksh to mksh, we cannot
# use apt-listchanges with a NEWS.Debian file here; neither can we
# use debconf as that would be considered abuse/nagging.
#
test $1 = upgrade && test -n "$2" && \
    dpkg --compare-versions "$2" lt '40.9.20120628-1~' && \
    echo '
+===============================================================+
| Note for the pdksh -> mksh transition                         |
+---------------------------------------------------------------+
| If you have any user accounts with /bin/pdksh as login shell, |
| change these to /bin/mksh because pdksh will be replaced by a |
| symlink to lksh, a variant of mksh used to run legacy scripts |
| but not suitable for interactive use. For sane defaults, also |
| have users copy /etc/skel/.mkshrc into their home directories |
| and unset ENV. This warning will only be shown this once.     |
+===============================================================+
'

exit 0