resyn implementation of m-s gen-key with the help output
authorMicah Anderson <micah@riseup.net>
Sat, 31 Jan 2009 22:27:18 +0000 (17:27 -0500)
committerMicah Anderson <micah@riseup.net>
Sat, 31 Jan 2009 22:27:18 +0000 (17:27 -0500)
src/monkeysphere-server
tests/basic

index 2531437eb83f4b3a2c1d3d98b17548ba138312b3..3caa63d4ac18061537cb2a111fdcd16f7c91b34e 100755 (executable)
@@ -406,10 +406,6 @@ gen_key() {
     # get options
     while true ; do
        case "$1" in
-           -h|--hostname)
-               hostName="$2"
-               shift 2
-               ;;
            -l|--length)
                keyLength="$2"
                shift 2
@@ -427,6 +423,7 @@ gen_key() {
                    failure "Unknown option '$1'.
 Type '$PGRM help' for usage."
                fi
+               hostName="$1"
                break
                ;;
        esac
index 5ba7a250b948affc504378ee09f2dce4ba79d76f..7fdca39e308037506e073b4603a6ecede1da751f 100755 (executable)
@@ -8,8 +8,7 @@
 # Copyright: 2008
 # License: GPL v3 or later
 
-# these tests should all be able to
-# as a non-privileged user.
+# these tests should all be able to run as a non-privileged user.
 
 # all subcommands in this script should complete without failure:
 set -e
@@ -193,7 +192,7 @@ echo | monkeysphere-server gen-key --length 1024 --expire 0 testhost
 # remove the gpg.conf
 rm "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf
 
-HOSTKEYID=$( monkeysphere-server show-key | tail -n1 | cut -f3 -d\  )
+HOSTKEYID=$( monkeysphere-server show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\  )
 
 # certify it with the "Admin's Key".
 # (this would normally be done via keyservers)