From 012515be4fb9bc5435a47e41574dc2ef4221a5d7 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 1 Sep 2017 22:03:23 +0200 Subject: [PATCH] rsync-ssh-wrap: also allow uploads to SecurityUploadQueue Signed-off-by: Julien Cristau --- modules/roles/files/ssh_upload/rsync-ssh-wrap | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 -- 2.20.1