merged jrollins/master
[monkeysphere.git] / src / share / mh / add_hostname
index 70bbec3f535acc9149a6c401cc5682d7a88c8d7b..ec741ee5a114f8eb99cfc3e99f15d6a202c91a18 100644 (file)
@@ -32,10 +32,12 @@ find_host_userid > /dev/null && \
     failure "Host userID '$userID' already exists."
 
 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
+    cat <<EOF
+The following user ID will be added to the host key:
+  $userID
+EOF
+    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