canonicalize prompting to prompt if MONKEYSPHERE_PROMPT != 'false'
[monkeysphere.git] / src / share / ma / add_certifier
index 402da08e552cdccdf48329f89df4af28aca0fc12..bd3819006ef27b72a6e4b74417877ef176cc728c 100644 (file)
@@ -135,9 +135,9 @@ EOF
     log info "key found:"
     gpg_sphere "--fingerprint 0x${fingerprint}!"
 
-    if [ "$PROMPT" = "true" ] ; then
-       echo "Are you sure you want to add the above key as a certifier"
-       read -p "of users on this system? (Y/n) " OK; OK=${OK:-Y}
+    if [ "$PROMPT" != "false" ] ; then
+       printf "Are you sure you want to add the above key as a certifier\nof users on this system? (Y/n) " >&2
+       read OK; OK=${OK:-Y}
        if [ "${OK/y/Y}" != 'Y' ] ; then
            failure "Identity certifier not added."
        fi