From 0e7d6a75c6c2a7463b0c2b3ea80f87b34a529cd1 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Thu, 14 May 2020 09:08:27 +0300 Subject: [PATCH] [Ubuntu] Add /tmp cleanup (#878) * add tmp cleanup * low min to 17800 --- images/linux/scripts/installers/cleanup.sh | 1 + images/linux/scripts/installers/validate-disk-space.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/cleanup.sh b/images/linux/scripts/installers/cleanup.sh index fe284f339..954e51fc9 100644 --- a/images/linux/scripts/installers/cleanup.sh +++ b/images/linux/scripts/installers/cleanup.sh @@ -6,6 +6,7 @@ before=$(df / -Pm | awk 'NR==2{print $4}') # clears out the local repository of retrieved package files # It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial apt-get clean +rm -rf /tmp/* # after cleanup after=$(df / -Pm | awk 'NR==2{print $4}') diff --git a/images/linux/scripts/installers/validate-disk-space.sh b/images/linux/scripts/installers/validate-disk-space.sh index 5201848d7..79a589ddc 100644 --- a/images/linux/scripts/installers/validate-disk-space.sh +++ b/images/linux/scripts/installers/validate-disk-space.sh @@ -5,7 +5,7 @@ ################################################################################ availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}') -minimumFreeSpaceMB=18000 +minimumFreeSpaceMB=17800 echo "Available disk space: $availableSpaceMB MB" if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then