X-Git-Url: https://git.distorted.org.uk/~mdw/ssh-ca/blobdiff_plain/b865e18bf5b9c686bf5f8929de75fd5649cafb92..58f8f79df0c99430a5817bb3bb8f2e3c47ebe2af:/bin/sign diff --git a/bin/sign b/bin/sign index 17d7d22..29add64 100755 --- a/bin/sign +++ b/bin/sign @@ -35,6 +35,7 @@ while read line <&3; do set -- $line host=$1 names="" + nicks="" ## If this is a different host, then start a new section of the list. case "$last" in @@ -46,10 +47,10 @@ while read line <&3; do ## Build a list of names for the host. for n in "$@"; do - names=${names:+$names,}$n case "$n" in - *.* | *:*) ;; - *) names=${names:+$names,}$n.$domain ;; + .*) for h in $nicks; do names=${names:+$names,}$h$n,$h$n.$domain; done ;; + *.* | *:*) names=${names:+$names,}$n ;; + *) nicks=${nicks:+$nicks }$n names=${names:+$names,}$n,$n.$domain ;; esac done