From 1a1fabeafd6e4f4ec2fa4afc968aa15b59ffa1c2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 23 Aug 2007 10:37:03 +0000 Subject: [PATCH] upload.sh: Add option ssh_identity Add config option ssh_identity TODO: this obsoletes scp_pw and rsync_ssh_pw, remove them --- scripts/upload.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/upload.sh b/scripts/upload.sh index 7bb49d0e..df11107e 100644 --- a/scripts/upload.sh +++ b/scripts/upload.sh @@ -43,9 +43,14 @@ file_mode= dir_mode= file_owner= file_group= +ssh_identity= test -f $CFG_FILE && . $CFG_FILE +if [ -n "$ssh_identity" ]; then + CFG_IDENTITY="-i $ssh_identity" +fi + usage() { cat << EOT @@ -86,6 +91,7 @@ cat << EOT dir_mode="$dir_mode" file_owner="$file_owner" file_group="$file_group" + ssh_identity="$ssh_identity" Options: @@ -117,7 +123,9 @@ parse_target() if [ -n "$PASSWD" ]; then echo passwd="\"$PASSWD\";" if [ -f "$PASSWD" ]; then - echo IDENTITY="\"-i $PASSWD\"" + echo IDENTITY="\"-i $PASSWD\";" + else + echo IDENTITY="\"$CFG_IDENTITY\";" fi echo pw_ftp="\"$PASSWD\";" echo pw_scp="\"$PASSWD\";"