fi
# if authentication key is valid, prompt to continue
if [ "$validity" = 'u' ] ; then
- echo "A valid authentication key already exists for primary key '$keyID'."
+ echo "A valid authentication key already exists for primary key '$keyID'." 1>&2
if [ "$PROMPT" = "true" ] ; then
read -p "Are you sure you would like to generate another one? (y/N) " OK; OK=${OK:N}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "Host userID '$userID' already exists."
if [ "$PROMPT" = "true" ] ; then
- cat <<EOF
-The following user ID will be added to the host key:
+ read -p "The following user ID will be added to the host key:
$userID
-EOF
- read -p "Are you sure you would like to add this user ID? (Y/n) " OK; OK=${OK:=Y}
+Are you sure you would like to add this user ID? (Y/n) " OK; OK=${OK:=Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "User ID not added."
fi
su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --fingerprint 0x${fingerprint}!"
if [ "$PROMPT" = "true" ] ; then
- echo "Are you sure you want to add the above key as a revoker"
- read -p "of the host key? (Y/n) " OK; OK=${OK:-Y}
+ read -p "Are you sure you want to add the above key as a revoker
+of the host key? (Y/n) " OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "revoker not added."
fi
failure "No non-revoked user ID found matching '$userID'."
if [ "$PROMPT" = "true" ] ; then
- cat <<EOF
-The following host key user ID will be revoked:
+ read -p "The following host key user ID will be revoked:
$userID
-EOF
- read -p "Are you sure you would like to revoke this user ID? (Y/n) " OK; OK=${OK:=Y}
+Are you sure you would like to revoke this user ID? (Y/n) " OK; OK=${OK:=Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "User ID not revoked."
fi