Merge commit 'dkg/master'
[monkeysphere.git] / src / subcommands / mh / gen-key
index 9f260873362031dd638f48cbe2259f311caaef9b..72b913823761d1d099da1df7c5a9817d6a999fe6 100755 (executable)
@@ -10,6 +10,8 @@
 # They are Copyright 2008, and are all released under the GPL, version 3
 # or later.
 
+gen_key() {
+
 local keyType="RSA"
 local keyLength="2048"
 local keyUsage="auth"
@@ -27,10 +29,6 @@ fingerprint_server_key >/dev/null \
 # get options
 while true ; do
        case "$1" in
-           -h|--hostname)
-               hostName="$2"
-               shift 2
-               ;;
            -l|--length)
                keyLength="$2"
                shift 2
@@ -44,6 +42,8 @@ while true ; do
                    failure "Unknown option '$1'.
 Type '$PGRM help' for usage."
                fi
+               hostName="$1"
+               shift;
                break
                ;;
        esac
@@ -102,3 +102,5 @@ log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pu
 
 # show info about new key
 show_key
+
+}