# 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
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
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
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
# 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
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
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
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
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