summaryrefslogtreecommitdiffstats
path: root/bin/maintenance.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-12-04 09:28:21 +0100
committerHolger Levsen <holger@layer-acht.org>2016-12-04 09:28:21 +0100
commit75752039947f9b4ce5ac51ab6f4111c16a21ddd5 (patch)
treeb222b2f243634007d3cb102795e5838a329afe47 /bin/maintenance.sh
parentce9d61f53c49f8bcd937fd5add90bce04e1ef84e (diff)
downloadjenkins.debian.net-75752039947f9b4ce5ac51ab6f4111c16a21ddd5.tar.xz
d-i maintenance: ignore /srv/d-i/isos when looking for old stuff
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/maintenance.sh')
-rwxr-xr-xbin/maintenance.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/maintenance.sh b/bin/maintenance.sh
index bb75c5dc..41c166b5 100755
--- a/bin/maintenance.sh
+++ b/bin/maintenance.sh
@@ -62,9 +62,12 @@ report_old_directories() {
# find and warn about old temp directories
if [ -z "$3" ] ; then
OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 -exec ls -lad {} \;)
- else
+ elif [ -z "$4" ] ; then
# if $3 is given, ignore it
OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 ! -path "$3*" -exec ls -lad {} \;)
+ else
+ # if $3 + $4 are given, ignore them
+ OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 ! -path "$3*" ! -path "$4*" -exec ls -lad {} \;)
fi
if [ ! -z "$OLDSTUFF" ] ; then
echo "Warning: old temp directories found in $1"
@@ -193,7 +196,7 @@ else
echo "WARNING: there is no check / handling on stale lvm volumes"
rm $ACTIVE_JOBS $WATCHED_JOBS $RUNNING
;;
- d-i) report_old_directories /srv/d-i 7 /srv/d-i/workspace
+ d-i) report_old_directories /srv/d-i 7 /srv/d-i/workspace /srv/d-i/isos
;;
squid) report_squid_usage
;;