Revision 14383,
1.2 KB
checked in by ghudson, 25 years ago
(diff) |
Fix attachandrun invocation of pgp.
|
-
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 | # Nothing below this line needs to be modified to use a different keyring. |
---|
10 | |
---|
11 | if [ $# -eq 0 ]; then |
---|
12 | # Called with no arguments. Use current MH message number. |
---|
13 | cd `show -noheader -showproc pwd` |
---|
14 | msgfile=`show -noheader -showproc echo $1` || exit 1 |
---|
15 | else |
---|
16 | # Argument; either filename, dash, or MH message number |
---|
17 | if [ $1 = "-" ]; then |
---|
18 | # standard input |
---|
19 | msgfile=-f |
---|
20 | elif [ -s $1 ]; then |
---|
21 | # Filename |
---|
22 | msgfile=$1 |
---|
23 | else |
---|
24 | # MH message number |
---|
25 | cd `show -noheader -showproc pwd` |
---|
26 | msgfile=`show -noheader -showproc echo $1` || exit 1 |
---|
27 | fi |
---|
28 | fi |
---|
29 | |
---|
30 | TESTECHO=`echo -n` |
---|
31 | case "$TESTECHO" in |
---|
32 | -n) N=''; C='\c';; |
---|
33 | *) N='-n'; C='';; |
---|
34 | esac |
---|
35 | |
---|
36 | outfile=/usr/tmp/verify.$$ |
---|
37 | rm -f $outfile |
---|
38 | page=${PAGER-more} |
---|
39 | echo "Please make sure the following says the signature is good and that" |
---|
40 | echo "the message is addressed to you." |
---|
41 | |
---|
42 | /bin/athena/attachandrun pgp pgp pgp $msgfile -o $outfile +verbose=0 |
---|
43 | if [ $? = 0 ]; then |
---|
44 | echo "" |
---|
45 | echo $N "The message follows. Press ENTER to continue... $C" |
---|
46 | read foo |
---|
47 | echo "===============" |
---|
48 | $page $outfile |
---|
49 | rm -f $outfile |
---|
50 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.