From 460b431da971dc01d047dcefd2e146c6d42c0195 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 29 Dec 2015 15:32:56 +0100 Subject: [PATCH] Remember if a file is not on snapshot, don't try every run --- scripts/debian/link_morgue.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/debian/link_morgue.sh b/scripts/debian/link_morgue.sh index 83d4aeb2..b4dec532 100755 --- a/scripts/debian/link_morgue.sh +++ b/scripts/debian/link_morgue.sh @@ -85,6 +85,11 @@ cd "${PROCESSDIR}" log "Processing ${PROCESSDIR}" find ${PROCESSDIR} -type f | while read mfile; do + if [[ -f ${mfile}.nosnapshot ]]; then + # We know this file does not exist on snapshot, don't check again + continue + fi + # Get the files sha1sum mshasum=$(sha1sum ${mfile}) mshasum=${mshasum%% *} @@ -111,6 +116,8 @@ while read mfile; do # Yay for tons of dangling symlinks, but when this is done a rsync # will run and transfer the whole shitload of links over to the morgue host. ln -sf "${FARMBASE}/${LVL1}/${LVL2}/${mshasum}" "${mfile}" + else + touch "${mfile}.nosnapshot" fi fi done # for mfile in... -- 2.39.5