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 / bluez-utils.preinst < prev    next >
Encoding:
Text File  |  2007-03-30  |  674 b   |  27 lines

  1. #!/bin/sh
  2.  
  3. # snip from http://www.dpkg.org/ConffileHandling
  4.  
  5. # Prepare to move a conffile without triggering a dpkg question
  6. prep_mv_conffile() {
  7.     CONFFILE="$1"
  8.  
  9.     if [ -e "$CONFFILE" ]; then
  10.         md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
  11.         old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status`"
  12.         if [ "$md5sum" = "$old_md5sum" ]; then
  13.             rm -f "$CONFFILE"
  14.         fi
  15.     fi
  16. }
  17.  
  18. case "$1" in
  19. install|upgrade)
  20.     if dpkg --compare-versions "$2" le "2.19-1"; then
  21.         prep_mv_conffile "/etc/init.d/bluez-utils"
  22.         prep_mv_conffile "/etc/default/bluez-utils"
  23.     fi
  24. esac
  25.         
  26.  
  27.