tweak/cleanup some of the prompts.
[monkeysphere.git] / src / share / mh / import_key
index 040b41c57140862760b9e10dcac2189bdcb44f65..7c11890d6c0306bd6a54816c8d55c34e1dabeca1 100644 (file)
@@ -44,6 +44,21 @@ fi
 
 userID="ssh://${hostName}"
 
+if [ "$PROMPT" = "true" ] ; then
+    cat <<EOF
+The ssh key will be imported and an OpenPGP certificate for this host
+will be generated with the following user ID:
+  $userID
+EOF
+    read -p "Are you sure you would like to create certificate? [Y/n] " OK; OK=${OK:-Y}
+    if [ "${OK/y/Y}" != 'Y' ] ; then
+       failure "revoker not added."
+    fi
+else
+    log debug "importing key without prompting."
+fi
+
+
 # create host home
 mkdir -p "${MHDATADIR}"
 mkdir -p "${GNUPGHOME_HOST}"