Permalink
Browse files

Merge branch 'master' into HEAD

  • Loading branch information...
2 parents 05728de + 44e94d1 commit 8b26091c0c911af35feb32333fbd2c3020a82387 CI Bot committed Dec 22, 2016
Showing with 6 additions and 1 deletion.
  1. +6 −1 jobs/baggageclaim/templates/baggageclaim_ctl.erb
@@ -33,7 +33,12 @@ case $1 in
<% if p('volumes_image_size_mb') > 0 %>
IMAGE_SIZE=<%= p('volumes_image_size_mb') %>
<% else %>
- IMAGE_SIZE=$(($(df -m /var/vcap/data | tail -n1 | awk '{print $2}') - 10 * 1024))
+ DISK_SIZE=$(df -m /var/vcap/data | tail -n1 | awk '{print $2}')
+ IMAGE_SIZE=$(($DISK_SIZE - 10 * 1024))
+
+ if [[ $IMAGE_SIZE -lt 0 ]]; then
+ IMAGE_SIZE=$DISK_SIZE
+ fi
<% end %>
mkdir -p $(dirname ${IMAGE_PATH})

0 comments on commit 8b26091

Please sign in to comment.