Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
packer-centos-7/scripts/cleanup.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
11 lines (8 sloc)
281 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
# Zero out the rest of the free space using dd, then delete the written file. | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm -f /EMPTY | |
# Disable the centos user | |
chsh -s /bin/false centos | |
# Add `sync` so Packer doesn't quit too early, before the large file is deleted. | |
sync |