rpm: assign a real shell to user monkeysphere
[monkeysphere.git] / src / share / mh / add_name
index 0eeefb79404ab89c873a48fd10f5b2feda3f9034..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