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 / usr / bin / gpg-convert-from-106 < prev    next >
Encoding:
Text File  |  2007-03-07  |  1.5 KB  |  58 lines

  1. #!/bin/sh
  2. # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. # General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. if ! gpg --version > /dev/null 2>&1 ; then
  19.    echo "GnuPG not available!"
  20.    exit 1
  21. fi
  22.  
  23. gpg="gpg --no-greeting --no-secmem-warning"
  24.  
  25. echo "This script converts your public keyring and trustdb from GnuPG"
  26. echo "1.0.6 or earlier to the 1.0.7 and later format."
  27.  
  28. echo "If you have already done this, there is no harm (but no point)"
  29. echo "in doing it again."
  30.  
  31. echo -n "Continue? (y/N)"
  32.  
  33. read answer
  34.  
  35. if test "x$answer" != "xy" ; then
  36.   exit 0
  37. fi
  38.  
  39. echo
  40. echo "Marking your keys as ultimately trusted"
  41. for key in `$gpg --with-colons --list-secret-keys | grep sec: | cut -d: -f5`
  42. do
  43.   $gpg --trusted-key $key --with-colons --list-keys $key > /dev/null 2>&1
  44.   echo -n "."
  45. done
  46. echo
  47.  
  48. echo
  49. echo "Adding signature caches"
  50. $gpg --rebuild-keydb-caches
  51.  
  52. echo
  53. echo "Checking trustdb"
  54. $gpg --check-trustdb
  55.  
  56. echo
  57. echo "Done!"
  58.