check_key_userid "$keyID" "$serviceName" && \
failure "Service name '$serviceName' already exists on key '$keyID'."
+# test that a key with that user ID does not already exist
+prompt_userid_exists "$serviceName"
+
check_service_name "$serviceName"
-if [ "$PROMPT" = "true" ] ; then
+if [ "$PROMPT" != "false" ] ; then
printf "The following service name will be added to key '$keyID':\n %s\nAre you sure you would like to add this service name? (Y/n) " "$serviceName" >&2
read OK; OK=${OK:=Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
gpg_host --check-trustdb
- update_gpg_pub_file
+ update_pgp_pub_file
show_key "$keyID"