X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fsubcommands%2Fmh%2Fadd-hostname;h=10d5f5828b93ad7c4fef6e5625e3acb19ba17279;hb=54b8a4cdbedafdde87cfa35dc61a48d6a2d46bc6;hp=fc1ae9665ec76745ffed24900e72bea31e8e12fb;hpb=7d4b4815db8ba2f6f984a18a90b50032cf9158ba;p=monkeysphere.git diff --git a/src/subcommands/mh/add-hostname b/src/subcommands/mh/add-hostname old mode 100755 new mode 100644 index fc1ae96..10d5f58 --- a/src/subcommands/mh/add-hostname +++ b/src/subcommands/mh/add-hostname @@ -1,17 +1,20 @@ -#!/usr/bin/env bash +# -*-shell-script-*- +# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant) # Monkeysphere host add-hostname subcommand # # The monkeysphere scripts are written by: -# Jameson Rollins +# Jameson Rollins # Jamie McClelland # Daniel Kahn Gillmor # -# 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. # add hostname user ID to server key +add_hostname() { + local userID local fingerprint local tmpuidMatch @@ -58,10 +61,7 @@ EOF if echo "$adduidCommand" | \ gpg_host --quiet --command-fd 0 --edit-key "0x${fingerprint}!" ; then - # update the trustdb for the authentication keyring - gpg_authentication "--check-trustdb" - - show_server_key + show_key echo echo "NOTE: User ID added to key, but key not published." @@ -69,3 +69,5 @@ if echo "$adduidCommand" | \ else failure "Problem adding user ID." fi + +}