clean up failure message
[monkeysphere.git] / src / share / ma / add_certifier
index 54ea67334fdb94fb749a6a106f41fbd454b9a19c..b917a7459e7a358baa43cb86159aadd0ec744788 100644 (file)
@@ -84,7 +84,8 @@ if [ -f "$keyID" ] ; then
     # + failure 'could not read key from '\''/root/dkg.gpg'\'''
     # + echo 'could not read key from '\''/root/dkg.gpg'\'''
 
-    keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ )
+    keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ ) || \
+       failure "There were no gpg keys in the file $keyID."
     if [ -z "$keyID" ] || [ $(echo "$keyID" | wc -l) -ne 1 ] ; then
        failure "There was not exactly one gpg key in the file."
     fi
@@ -151,7 +152,7 @@ EOF
 # core ltsigns the newly imported certifier key
 log debug "executing core ltsign script..."
 if echo "$ltsignCommand" | \
-    gpg_core --quiet --command-fd 0 --edit-key "0x${fingerprint}!" ; then
+    gpg_core --command-fd 0 --edit-key "0x${fingerprint}!" ; then
 
     # transfer the new sigs back to the sphere keyring
     gpg_core_sphere_sig_transfer