home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libpam-runtime.preinst < prev    next >
Encoding:
Text File  |  2006-12-20  |  1.0 KB  |  51 lines

  1. #! /bin/sh
  2. # see: dh_installdeb(1)
  3.  
  4. set -e
  5.  
  6. remove_md5() {
  7.     if md5sum $1 2>/dev/null |grep -q $2; then
  8.     cp $1 $1.pre-upgrade
  9.     sed -e '/password[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
  10.         && mv $1.post-upgrade $1
  11.     fi
  12.     }
  13.     
  14.  
  15.  
  16. # summary of how this script can be called:
  17. #        * <new-preinst> `install'
  18. #        * <new-preinst> `install' <old-version>
  19. #        * <new-preinst> `upgrade' <old-version>
  20. #        * <old-preinst> `abort-upgrade' <new-version>
  21. #
  22. # for details, see http://www.debian.org/doc/debian-policy/ or
  23. # the debian-policy package
  24.  
  25.  
  26. case "$1" in
  27.     install|upgrade)
  28.         if [ "x$2" != "x" ] ; then
  29.         if dpkg --compare-versions $2 lt 0.76 ; then
  30.         remove_md5 /etc/pam.d/other a9a9d551b75001ccb5b553927e46e601
  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.  
  49.  
  50. exit 0
  51.