Revision 8990,
1.2 KB
checked in by ghudson, 28 years ago
(diff) |
Use @PATH@ (substituted in at build time) to determine canonical path to
pgp, rather than relying on bin symlink.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # Script to verify PGP signature of mail message |
---|
4 | # |
---|
5 | |
---|
6 | # Location of public key ring: pubring.pgp |
---|
7 | PGPPATH=/afs/athena/system/config/keys/early-warn; export PGPPATH |
---|
8 | |
---|
9 | attach -quiet -nomap pgp |
---|
10 | |
---|
11 | # Nothing below this line needs to be modified to use a different keyring. |
---|
12 | |
---|
13 | if [ $# -eq 0 ]; then |
---|
14 | # Called with no arguments. Use current MH message number. |
---|
15 | cd `show -noheader -showproc pwd` |
---|
16 | msgfile=`show -noheader -showproc echo $1` || exit 1 |
---|
17 | else |
---|
18 | # Argument; either filename, dash, or MH message number |
---|
19 | if [ $1 = "-" ]; then |
---|
20 | # standard input |
---|
21 | msgfile=-f |
---|
22 | elif [ -s $1 ]; then |
---|
23 | # Filename |
---|
24 | msgfile=$1 |
---|
25 | else |
---|
26 | # MH message number |
---|
27 | cd `show -noheader -showproc pwd` |
---|
28 | msgfile=`show -noheader -showproc echo $1` || exit 1 |
---|
29 | fi |
---|
30 | fi |
---|
31 | |
---|
32 | TESTECHO=`echo -n` |
---|
33 | case "$TESTECHO" in |
---|
34 | -n) N=''; C='\c';; |
---|
35 | *) N='-n'; C='';; |
---|
36 | esac |
---|
37 | |
---|
38 | outfile=/usr/tmp/verify.$$ |
---|
39 | rm -f $outfile |
---|
40 | page=${PAGER-more} |
---|
41 | echo "Please make sure the following says the signature is good and that" |
---|
42 | echo "the message is addressed to you." |
---|
43 | |
---|
44 | @PATH@ $msgfile -o $outfile +verbose=0 |
---|
45 | if [ $? = 0 ]; then |
---|
46 | echo "" |
---|
47 | echo $N "The message follows. Press ENTER to continue... $C" |
---|
48 | read foo |
---|
49 | echo "===============" |
---|
50 | $page $outfile |
---|
51 | rm -f $outfile |
---|
52 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.