aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-09-21 20:25:51 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2017-09-21 20:25:51 -0700
commit11248fd427ad8c8aff97707905bd849881311d98 (patch)
treecd5b0dc926f296ea0ea31937a65a6651cbdb7971
parentFixup print-exclusion-list usage. (diff)
downloadmastermirror-scripts-11248fd427ad8c8aff97707905bd849881311d98.tar.gz
mastermirror-scripts-11248fd427ad8c8aff97707905bd849881311d98.tar.bz2
mastermirror-scripts-11248fd427ad8c8aff97707905bd849881311d98.zip
snapshots-create.sh: change the too-much-size-change margins.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xsnapshots-create.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh
index 99f4d63..a89fd85 100755
--- a/snapshots-create.sh
+++ b/snapshots-create.sh
@@ -145,11 +145,17 @@ previous_size=$(stat -c '%s' "${UPLOAD}/${DELTA_FILENAME}")
if [ ${current_size} -lt ${previous_size} ]; then
size_difference=$(expr ${previous_size} - ${current_size})
difference_ratio=$(expr ${previous_size} / ${size_difference})
- if [ ${difference_ratio} -lt 5 ]; then
- echo "Snapshot size has decreased by more than 20% in one day!!!"
+ if [ ${difference_ratio} -lt 2 ]; then
+ echo "Snapshot size has decreased by more than 50% in one day!!!"
echo "${FILENAME} ${current_size} bytes"
echo "${DELTA_FILENAME} ${previous_size} bytes"
exit 1
+ elif [ ${difference_ratio} -lt 5 ]; then
+ echo "Snapshot size has decreased by more than 20% in one day!!!"
+ echo "${FILENAME} ${current_size} bytes"
+ echo "${DELTA_FILENAME} ${previous_size} bytes"
+ # Make this non-fatal while we recover more space.
+ #exit 1
fi
fi
write_time_log "END SIZE SANITY $(date -u)"