File: preinst

package info (click to toggle)
pdksh 5.2.14-20
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,884 kB
  • ctags: 2,293
  • sloc: ansic: 24,016; perl: 944; makefile: 606; sh: 308; sed: 40
file content (16 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# vim:ts=4:et
# $Id: preinst,v 1.1 2005/04/10 15:11:26 robert Exp $

# Be nice to users and update /bin/sh link in case it pointed to /bin/ksh
# Note, I use cmp, because I'm not sure if woody's readlink accepts
# the -f option and I'm too lazy to check it.
if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "5.2.14-18" && \
    [ -L /bin/sh ] && cmp -s "/bin/sh"  "/bin/ksh"  ; then
    ln /bin/ksh /bin/ksh.saved.by.pdksh.preinst
    ln -sf ksh.saved.by.pdksh.preinst  /bin/sh
fi

#DEBHELPER#

exit 0