Helm charts for supporting clustering in ODL
[integration/packaging.git] / packer / provision / minimize.sh
1 #!/usr/bin/env bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 set -ex
7
8 # This doesn't seem to reduce the size of the box, and may break
9 # Docker builds. See comments on git.opendaylight.org/gerrit/#/c/50382.
10
11 # Write 0s in free space until full (full->exit 1, force 0)
12 #sudo dd if=/dev/zero of=/EMPTY bs=1M || true
13
14 # Remove pointer to all the 0-space
15 #sudo rm -f /EMPTY
16
17 # Block until the empty file has been removed, otherwise, Packer
18 # will try to kill the box while the disk is still full and that's bad
19 #sudo sync