From 0f705986ab0898a1cd23c3e6d25a118cbd804648 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 20 Jun 2010 18:16:07 +0200 Subject: ftpdir-cleanup: only search for linked packages in actual repos --- cron-jobs/ftpdir-cleanup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cron-jobs/ftpdir-cleanup') diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index 2e23440..66733f0 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -30,8 +30,10 @@ trap ctrl_c 2 #adjust the nice level to run at a lower priority /usr/bin/renice +10 -p $$ > /dev/null +repopaths='' for repo in $repos; do $(dirname $0)/../misc-scripts/ftpdir-cleanup $repo + repopaths="${repopaths} ${FTP_BASE}/${repo}/os/" done to_cleanup="" @@ -40,7 +42,7 @@ for _arch in ${ARCHES[@]}; do cd $poolpath for pkg in *$PKGEXT; do [ -f "$pkg" ] || continue # in case we get a file named "*.pkg.tar.gz" - LINKS="$(/usr/bin/find $FTP_BASE -type l -name "$pkg" 2>/dev/null)" + LINKS="$(/usr/bin/find $repopaths -type l -name "$pkg" 2>/dev/null)" if [ -z "$LINKS" ]; then to_cleanup="$to_cleanup $poolpath/$pkg" fi -- cgit v1.2.3-24-g4f1b