From 66a78afe5bdd04b7247239e3cd0772ef45a08f24 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Mon, 7 Aug 2017 20:40:54 +0200 Subject: making the zero write optional --- provision/cleanup.sh | 7 +------ provision/write_zeroes.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) mode change 100755 => 100644 provision/cleanup.sh create mode 100644 provision/write_zeroes.sh diff --git a/provision/cleanup.sh b/provision/cleanup.sh old mode 100755 new mode 100644 index 29da429..d8fbc3c --- a/provision/cleanup.sh +++ b/provision/cleanup.sh @@ -3,10 +3,5 @@ set -e set -x +# clear package cache 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 diff --git a/provision/write_zeroes.sh b/provision/write_zeroes.sh new file mode 100644 index 0000000..a7fac3e --- /dev/null +++ b/provision/write_zeroes.sh @@ -0,0 +1,10 @@ +#/bin/bash + +set -e +set -x + +# 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 -- cgit v1.2.3-70-g09d2