From: Ansgar Burchardt Date: Thu, 20 Sep 2012 09:32:41 +0000 (+0200) Subject: link_morgue.sh: adapt to work also on security-master X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf8fe52d8887fbb494f9a2831643ed6a3638860;p=dak link_morgue.sh: adapt to work also on security-master --- diff --git a/scripts/debian/link_morgue.sh b/scripts/debian/link_morgue.sh index 4fb040ea..21d07caa 100755 --- a/scripts/debian/link_morgue.sh +++ b/scripts/debian/link_morgue.sh @@ -51,7 +51,22 @@ function log () { echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${prefix}[$$]: $@" } -export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars +case "$(hostname)" in + franck) + SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars + archive=ftp-master + ;; + chopin) + SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars + archive=security-master + ;; + *) + echo "Unknown host $(hostname)" >&2 + exit 1 + ;; +esac + +export SCRIPTVARS . $SCRIPTVARS function byebye_lock() { @@ -113,7 +128,7 @@ if [ "$(hostname -s)" != "stabile" ]; then # on the other side should contain (one line, no #) # command="rsync --server -lHogDtpRe.Lsf --remove-source-files . /srv/morgue.debian.org/sync/ftp-master", # no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from="ftp-master.debian.org" ssh-rsa... - rsync -aHq -e "ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 " --remove-source-files --from0 --files-from=${LISTFILE} $base/morgue/ morgue-sync:/srv/morgue.debian.org/sync/ftp-master + rsync -aHq -e "ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 " --remove-source-files --from0 --files-from=${LISTFILE} $base/morgue/ morgue-sync:/srv/morgue.debian.org/sync/$archive # And remove empty subdirs. To remove entire hierarchies we probably should run this # in a loop, but why bother? They'll be gone in a few days then, so meh.