Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/provision
diff options
context:
space:
mode:
Diffstat (limited to 'provision')
-rwxr-xr-x[-rw-r--r--]provision/cleanup.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/provision/cleanup.sh b/provision/cleanup.sh
index b8a2336..29da429 100644..100755
--- a/provision/cleanup.sh
+++ b/provision/cleanup.sh
@@ -4,3 +4,9 @@ set -e
set -x
yes | sudo pacman -Scc
+
+# Write zeros to improve virtual disk compaction.
+zerofile=$(/usr/bin/mktemp /zerofile.XXXXX)
+dd if=/dev/zero of="$zerofile" bs=1M || true
+rm -f "$zerofile"
+sync