summaryrefslogtreecommitdiff
path: root/src/share/mh
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2009-02-19 01:20:33 -0500
committerJameson Graef Rollins <jrollins@finestructure.net>2009-02-19 01:20:33 -0500
commit4465c13b93d3d4bc1cb59c5506775b4fc0274058 (patch)
tree31cf38794af37a7c3ef8e34a8d3e496449cf4aa7 /src/share/mh
parenta7d9d68be60e5d46c016806a47227cd2f2e5a6c7 (diff)
tweak some of the prompting, to change defaults, and add PROMPT usage where missing
Diffstat (limited to 'src/share/mh')
-rw-r--r--src/share/mh/add_hostname4
-rw-r--r--src/share/mh/add_revoker2
-rw-r--r--src/share/mh/publish_key4
-rw-r--r--src/share/mh/revoke_hostname4
-rw-r--r--src/share/mh/set_expire2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/share/mh/add_hostname b/src/share/mh/add_hostname
index 70bbec3..0da6a06 100644
--- a/src/share/mh/add_hostname
+++ b/src/share/mh/add_hostname
@@ -34,8 +34,8 @@ find_host_userid > /dev/null && \
if [ "$PROMPT" = "true" ] ; then
echo "The following user ID will be added to the host key:"
echo " $userID"
- read -p "Are you sure you would like to add this user ID? (y/N) " OK; OK=${OK:=N}
- if [ ${OK/y/Y} != 'Y' ] ; then
+ read -p "Are you sure you would like to add this user ID? (Y/n) " OK; OK=${OK:=Y}
+ if [ "${OK/y/Y}" != 'Y' ] ; then
failure "User ID not added."
fi
else
diff --git a/src/share/mh/add_revoker b/src/share/mh/add_revoker
index bdcb749..21dc0bb 100644
--- a/src/share/mh/add_revoker
+++ b/src/share/mh/add_revoker
@@ -79,7 +79,7 @@ gpg_host --fingerprint "0x${fingerprint}!"
if [ "$PROMPT" = "true" ] ; then
echo "Are you sure you want to add the above key as a"
- read -p "revoker of the host key? (y/N) " OK; OK=${OK:-N}
+ read -p "revoker of the host key? (Y/n) " OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "revoker not added."
fi
diff --git a/src/share/mh/publish_key b/src/share/mh/publish_key
index 37b8a72..05faa0b 100644
--- a/src/share/mh/publish_key
+++ b/src/share/mh/publish_key
@@ -18,8 +18,8 @@ publish_key() {
local GNUPGHOME
if [ "$PROMPT" = "true" ] ; then
- read -p "Really publish host key to $KEYSERVER? (y/N) " OK; OK=${OK:=N}
- if [ ${OK/y/Y} != 'Y' ] ; then
+ read -p "Really publish host key to $KEYSERVER? (Y/n) " OK; OK=${OK:=Y}
+ if [ "${OK/y/Y}" != 'Y' ] ; then
failure "key not published."
fi
else
diff --git a/src/share/mh/revoke_hostname b/src/share/mh/revoke_hostname
index 77f1f0d..92383a0 100644
--- a/src/share/mh/revoke_hostname
+++ b/src/share/mh/revoke_hostname
@@ -45,8 +45,8 @@ uidIndex=$(find_host_userid) || \
if [ "$PROMPT" = "true" ] ; then
echo "The following host key user ID will be revoked:"
echo " $userID"
- read -p "Are you sure you would like to revoke this user ID? (y/N) " OK; OK=${OK:=N}
- if [ ${OK/y/Y} != 'Y' ] ; then
+ read -p "Are you sure you would like to revoke this user ID? (N/y) " OK; OK=${OK:=Y}
+ if [ "${OK/y/Y}" != 'Y' ] ; then
failure "User ID not revoked."
fi
else
diff --git a/src/share/mh/set_expire b/src/share/mh/set_expire
index ae7c13a..63e5c55 100644
--- a/src/share/mh/set_expire
+++ b/src/share/mh/set_expire
@@ -22,7 +22,7 @@ local extendTo
extendTo=$(get_gpg_expiration "$1")
if [ "$PROMPT" = "true" ] ; then
- read -p "Are you sure you want to change the expiration on the host key to '$extendTo'? (y/N) " OK; OK=${OK:-N}
+ read -p "Are you sure you want to change the expiration on the host key to '$extendTo'? (Y/n) " OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "expiration not set."
fi