From: Ansgar Burchardt Date: Fri, 1 Sep 2017 20:03:23 +0000 (+0200) Subject: rsync-ssh-wrap: also allow uploads to SecurityUploadQueue X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=012515be4fb9bc5435a47e41574dc2ef4221a5d7;p=mirror%2Fdsa-puppet.git rsync-ssh-wrap: also allow uploads to SecurityUploadQueue Signed-off-by: Julien Cristau --- diff --git a/modules/roles/files/ssh_upload/rsync-ssh-wrap b/modules/roles/files/ssh_upload/rsync-ssh-wrap index 04ceb3e02..bdfc6f190 100755 --- a/modules/roles/files/ssh_upload/rsync-ssh-wrap +++ b/modules/roles/files/ssh_upload/rsync-ssh-wrap @@ -26,7 +26,7 @@ set -e set -u MYLOGNAME="`basename "$0"`[$$]" -RSYNCDIR="/srv/upload.debian.org/UploadQueue/" +RSYNCDIRS=(/srv/upload.debian.org/UploadQueue/ /srv/security.upload.debian.org/SecurityUploadQueue/) usage() { echo "local Usage: $0 " @@ -56,11 +56,14 @@ do_rsync() { local allowed_rsyncs allowed_rsyncs=() - if [ -d "$RSYNCDIR" ]; then - allowed_rsyncs+=("--server -vlogDtprxze.iLsf --partial . $RSYNCDIR") # wheezy - allowed_rsyncs+=("--server -vlogDtprxze.iLsfx --partial . $RSYNCDIR") # jessie - allowed_rsyncs+=("--server -vlogDtprxze.iLsfxC --partial . $RSYNCDIR") # stretch - fi + local rsyncdir + for rsyncdir in "${RSYNCDIRS[@]}"; do + if [ -d "$rsyncdir" ]; then + allowed_rsyncs+=("--server -vlogDtprxze.iLsf --partial . $rsyncdir") # wheezy + allowed_rsyncs+=("--server -vlogDtprxze.iLsfx --partial . $rsyncdir") # jessie + allowed_rsyncs+=("--server -vlogDtprxze.iLsfxC --partial . $rsyncdir") # stretch + fi + done for cmd_idx in ${!allowed_rsyncs[*]}; do allowed="${allowed_rsyncs[$cmd_idx]}" if [ "$*" = "$allowed" ]; then