X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fsubcommands%2Fmh%2Fimport-key;h=9ba51d24dfb26f99c1d9b600784ba5311ba56ab9;hb=7bf7ac9986b93cc910f5a1002d88da8b1f9e885a;hp=d60e982c38a047852b3c4b51620f888674a838c7;hpb=a0747749cbc7445e0cadaf0fbf1c92a2e86d1369;p=monkeysphere.git diff --git a/src/subcommands/mh/import-key b/src/subcommands/mh/import-key index d60e982..9ba51d2 100755 --- a/src/subcommands/mh/import-key +++ b/src/subcommands/mh/import-key @@ -10,6 +10,8 @@ # They are Copyright 2008, and are all released under the GPL, version 3 # or later. +import_key() { + local hostName=$(hostname -f) local keyFile="/etc/ssh/ssh_host_rsa_key" local keyExpire @@ -23,10 +25,6 @@ fingerprint_server_key >/dev/null \ # get options while true ; do case "$1" in - -h|--hostname) - hostName="$2" - shift 2 - ;; -f|--keyfile) keyFile="$2" shift 2 @@ -40,6 +38,9 @@ while true ; do failure "Unknown option '$1'. Type '$PGRM help' for usage." fi + hostName="$1" + shift + ;; break ;; esac @@ -83,3 +84,5 @@ log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pu # show info about new key show_key + +}