~ubuntu-branches/ubuntu/intrepid/shadow/intrepid-updates

« back to all changes in this revision

Viewing changes to debian/passwd.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2004-09-14 01:01:32 UTC
  • Revision ID: james.westby@ubuntu.com-20040914010132-caqdvzrhku8od2qk
Tags: 1:4.0.3-28.5ubuntu6
Update German translation of passwd/user-fullname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <new-preinst> `install'
 
10
#        * <new-preinst> `install' <old-version>
 
11
#        * <new-preinst> `upgrade' <old-version>
 
12
#        * <old-preinst> `abort-upgrade' <new-version>
 
13
#
 
14
# for details, see http://www.debian.org/doc/debian-policy/ or
 
15
# the debian-policy package
 
16
 
 
17
remove_md5() {
 
18
    if md5sum $1 2>/dev/null |grep -q $2; then
 
19
        cp $1 $1.pre-upgrade
 
20
        sed -e '/^[^#]*[ \t]*password[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
 
21
            && mv $1.post-upgrade $1
 
22
    fi
 
23
    }
 
24
 
 
25
 
 
26
case "$1" in
 
27
    install|upgrade)
 
28
        if [ "x$2" != "x" ] ; then
 
29
            if dpkg --compare-versions $2 lt 1:4.0.3 ; then
 
30
                remove_md5 /etc/pam.d/passwd 23a5d1465bbc1e39ca6e0c32f22a75c9
 
31
            fi
 
32
            fi
 
33
            
 
34
    ;;
 
35
 
 
36
    abort-upgrade)
 
37
    ;;
 
38
 
 
39
    *)
 
40
        echo "preinst called with unknown argument \`$1'" >&2
 
41
        exit 1
 
42
    ;;
 
43
esac
 
44
 
 
45
# dh_installdeb will replace this with shell code automatically
 
46
# generated by other debhelper scripts.
 
47
 
 
48
#DEBHELPER#
 
49
 
 
50
exit 0
 
51
 
 
52