summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJameson Rollins <jrollins@finestructure.net>2010-01-18 18:38:27 -0500
committerJameson Rollins <jrollins@finestructure.net>2010-01-18 18:38:27 -0500
commit7dbd6806e538ff8732dd87fcf20bfd8271464552 (patch)
tree7a564c4d55e5e6f9a2f74d1a22fa59aae03171a5
parent638a70f020f4ccda3deb15e5c697d384e0f705d7 (diff)
canonicalize prompting to prompt if MONKEYSPHERE_PROMPT != 'false'
-rwxr-xr-xsrc/monkeysphere2
-rwxr-xr-xsrc/monkeysphere-host2
-rw-r--r--src/share/common2
-rw-r--r--src/share/ma/add_certifier2
-rw-r--r--src/share/ma/remove_certifier2
-rw-r--r--src/share/mh/add_name2
-rw-r--r--src/share/mh/publish_key2
-rw-r--r--src/share/mh/revoke_name2
-rw-r--r--src/share/mh/set_expire2
9 files changed, 9 insertions, 9 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index e84ee63..1dee3ba 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -146,7 +146,7 @@ check_gpg_authentication_subkey() {
# if authentication key is valid, prompt to continue
if [ "$validity" = 'u' ] ; then
echo "A valid authentication key already exists for primary key '$keyID'." 1>&2
- if [ "$PROMPT" = "true" ] ; then
+ if [ "$PROMPT" != "false" ] ; then
printf "Are you sure you would like to generate another one? (y/N) " >&2
read OK; OK=${OK:N}
if [ "${OK/y/Y}" != 'Y' ] ; then
diff --git a/src/monkeysphere-host b/src/monkeysphere-host
index 4f536e2..fab3ef7 100755
--- a/src/monkeysphere-host
+++ b/src/monkeysphere-host
@@ -163,7 +163,7 @@ prompt_userid_exists() {
if gpgOut=$(gpg_host_list_keys "=${userID}" 2>/dev/null) ; then
fingerprint=$(echo "$gpgOut" | grep '^fpr:' | cut -d: -f10)
- if [ "$PROMPT" = "true" ] ; then
+ if [ "$PROMPT" != "false" ] ; then
printf "Service name '%s' is already being used by key '%s'.\nAre you sure you want to use it again? (y/N) " "$fingerprint" "$userID" >&2
read OK; OK=${OK:=N}
if [ "${OK/y/Y}" != 'Y' ] ; then
diff --git a/src/share/common b/src/share/common
index 914fffa..97f001a 100644
--- a/src/share/common
+++ b/src/share/common
@@ -281,7 +281,7 @@ get_gpg_expiration() {
keyExpire="$1"
- if [ -z "$keyExpire" -a "$PROMPT" = 'true' ]; then
+ if [ -z "$keyExpire" -a "$PROMPT" != 'false' ]; then
cat >&2 <<EOF
Please specify how long the key should be valid.
0 = key does not expire
diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier
index 1601997..bd38190 100644
--- a/src/share/ma/add_certifier
+++ b/src/share/ma/add_certifier
@@ -135,7 +135,7 @@ EOF
log info "key found:"
gpg_sphere "--fingerprint 0x${fingerprint}!"
- if [ "$PROMPT" = "true" ] ; then
+ 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
diff --git a/src/share/ma/remove_certifier b/src/share/ma/remove_certifier
index 79f1cda..51c7ee7 100644
--- a/src/share/ma/remove_certifier
+++ b/src/share/ma/remove_certifier
@@ -26,7 +26,7 @@ fi
# FIXME: should we be doing a fancier list_certifier output here?
gpg_core --list-key --fingerprint "0x${keyID}!" || failure
-if [ "$PROMPT" = "true" ] ; then
+if [ "$PROMPT" != "false" ] ; then
printf "Really remove the above listed identity certifier? (Y/n) " >&2
read OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
diff --git a/src/share/mh/add_name b/src/share/mh/add_name
index 754ced4..39ebace 100644
--- a/src/share/mh/add_name
+++ b/src/share/mh/add_name
@@ -39,7 +39,7 @@ 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
diff --git a/src/share/mh/publish_key b/src/share/mh/publish_key
index 553cd72..f1c1723 100644
--- a/src/share/mh/publish_key
+++ b/src/share/mh/publish_key
@@ -18,7 +18,7 @@ publish_key() {
local keyID="$1"
local GNUPGHOME
-if [ "$PROMPT" = "true" ] ; then
+if [ "$PROMPT" != "false" ] ; then
printf "Really publish key '$keyID' to $KEYSERVER? (Y/n) " >&2
read OK; OK=${OK:=Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
diff --git a/src/share/mh/revoke_name b/src/share/mh/revoke_name
index 7788327..532cb30 100644
--- a/src/share/mh/revoke_name
+++ b/src/share/mh/revoke_name
@@ -35,7 +35,7 @@ keyID=$(check_key_input "$@")
check_key_userid "$keyID" "$serviceName" || \
failure "No non-revoked service name found matching '$serviceName'."
-if [ "$PROMPT" = "true" ] ; then
+if [ "$PROMPT" != "false" ] ; then
printf "The following service name on key '$keyID' will be revoked:\n %s\nAre you sure you would like to revoke this service name? (Y/n) " "$serviceName" >&2
read OK; OK=${OK:=Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
diff --git a/src/share/mh/set_expire b/src/share/mh/set_expire
index be3f6bb..68a8dfd 100644
--- a/src/share/mh/set_expire
+++ b/src/share/mh/set_expire
@@ -35,7 +35,7 @@ shift
keyID=$(check_key_input "$@")
-if [ "$PROMPT" = "true" ] ; then
+if [ "$PROMPT" != "false" ] ; then
printf "Are you sure you want to change the expiration on key '$keyID' by '%s'? (Y/n) " "$extendBy" >&2
read OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then