rpm: assign a real shell to user monkeysphere
[monkeysphere.git] / src / share / mh / add_name
index b5922db412c2a8c2f1f701bed4a65d4290c8c7cb..39ebaceeb0dfe684b8713b547cc08af31f61efa5 100644 (file)
@@ -34,9 +34,12 @@ keyID=$(check_key_input "$@")
 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
@@ -54,7 +57,7 @@ if PEM2OPENPGP_USAGE_FLAGS=authenticate \
 
     gpg_host --check-trustdb
 
-    update_gpg_pub_file
+    update_pgp_pub_file
 
     show_key "$keyID"