diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-03-24 12:08:47 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-03-24 12:08:47 +0000 |
commit | 6b3e191272d2cd4aaf111dedd051b20d4a8d478f (patch) | |
tree | 9724b58140e8f2e1ad7342aad8afb4ff509386b4 /mksshauth | |
parent | 8882580b208a6624934065e551d67f9d45fb24cd (diff) |
Correct argument passing, so help is shown even with only one option (as the error message suggests).
Diffstat (limited to 'mksshauth')
-rwxr-xr-x | mksshauth | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4,7 +4,7 @@ # Copyright 2000-2001 Juri Jensen <juri@xenux.dk> # Copyright 2002 Juri Jensen <juri@xenux.dk> & Jonas Smedegaard <dr@jones.dk> # -# $Id: mksshauth,v 1.4 2002-12-03 17:29:39 jonas Exp $ +# $Id: mksshauth,v 1.5 2003-03-24 12:08:47 jonas Exp $ # # Setup local and remote SSH for non-interactive authorization # @@ -13,15 +13,12 @@ set -e prg=`basename $0` -if [ $# \< 2 ]; then +if [ $# \< 1 ]; then echo "ERROR: Wrong arguments! (Use '$prg --help' for help)" exit 1 fi keytype=$1 -host=$2 shift -shift -options=$@ case "$keytype" in --help|-h) @@ -59,6 +56,10 @@ case "$keytype" in ;; esac +host=$1 +shift +options=$@ + if [ -n "$options" ]; then options="$options " fi |