Merge commit 'mlcastle/master'
[monkeysphere.git] / src / share / mh / set_expire
index ae7c13a7089dedaa4baf37bc520f3053a6f137e9..9889e76e62bb28391bd83d3de0c654f9a853550e 100644 (file)
@@ -22,7 +22,8 @@ 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}
+    printf "Are you sure you want to change the expiration on the host key to '%s'? (Y/n) " "$extendTo" >&2
+    read OK; OK=${OK:-Y}
     if [ "${OK/y/Y}" != 'Y' ] ; then
        failure "expiration not set."
     fi
@@ -40,7 +41,7 @@ EOF
 
 update_gpg_pub_file
 
-cat <<EOF | log info
+log info <<EOF
 NOTE: Host key expiration date adjusted, but not yet published.
 Run '$PGRM publish-key' to publish the new expiration date.
 EOF