projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove executable bit, remove shebang line, update copyright on subcommands.
[monkeysphere.git]
/
src
/
subcommands
/
mh
/
gen-key
diff --git
a/src/subcommands/mh/gen-key
b/src/subcommands/mh/gen-key
old mode 100755
(executable)
new mode 100644
(file)
index
9f26087
..
aad213a
--- a/
src/subcommands/mh/gen-key
+++ b/
src/subcommands/mh/gen-key
@@
-1,14
+1,17
@@
-#!/usr/bin/env bash
+# -*-shell-script-*-
+# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
# Monkeysphere host gen-key subcommand
#
# The monkeysphere scripts are written by:
# Monkeysphere host gen-key subcommand
#
# The monkeysphere scripts are written by:
-# Jameson Rollins <jrollins@fi
fthhorseman
.net>
+# Jameson Rollins <jrollins@fi
nestructure
.net>
# Jamie McClelland <jm@mayfirst.org>
# Daniel Kahn Gillmor <dkg@fifthhorseman.net>
#
# Jamie McClelland <jm@mayfirst.org>
# Daniel Kahn Gillmor <dkg@fifthhorseman.net>
#
-# They are Copyright 2008, and are all released under the GPL, version 3
-# or later.
+# They are Copyright 2008-2009, and are all released under the GPL,
+# version 3 or later.
+
+gen_key() {
local keyType="RSA"
local keyLength="2048"
local keyType="RSA"
local keyLength="2048"
@@
-27,10
+30,6
@@
fingerprint_server_key >/dev/null \
# get options
while true ; do
case "$1" in
# get options
while true ; do
case "$1" in
- -h|--hostname)
- hostName="$2"
- shift 2
- ;;
-l|--length)
keyLength="$2"
shift 2
-l|--length)
keyLength="$2"
shift 2
@@
-44,6
+43,8
@@
while true ; do
failure "Unknown option '$1'.
Type '$PGRM help' for usage."
fi
failure "Unknown option '$1'.
Type '$PGRM help' for usage."
fi
+ hostName="$1"
+ shift;
break
;;
esac
break
;;
esac
@@
-102,3
+103,5
@@
log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pu
# show info about new key
show_key
# show info about new key
show_key
+
+}