X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fshare%2Fmh%2Fimport_key;h=c545388f9aaedd0300d899acc5ded47d029e7533;hb=ad2ac2649dd86299a6904ae8ad0849d2c3410bdb;hp=6394ad734fec1e601f92d1362329ae9ba51f06ad;hpb=c073811aa573d0e3486c39ed9514c46e0a7a077f;p=monkeysphere.git diff --git a/src/share/mh/import_key b/src/share/mh/import_key index 6394ad7..c545388 100644 --- a/src/share/mh/import_key +++ b/src/share/mh/import_key @@ -21,6 +21,11 @@ local userID sshKeyFile="$1" hostName="$2" +# check that key file specified +if [ -z "$sshKeyFile" ] ; then + failure "Must specify ssh key file to import, or specify '-' for stdin." +fi + # use the default hostname if not specified if [ -z "$hostName" ] ; then hostName=$(hostname -f) || failure "Could not determine hostname." @@ -39,15 +44,28 @@ fi userID="ssh://${hostName}" +if [ "$PROMPT" = "true" ] ; then + cat <