Cleanup /tmp in the guest
Clean all the content in the /tmp directory of the guest, leaving the directory itself (usually has special attributes). Modern distributions usually either setup a tmpfs on /tmp, or clean it at every boot, so the leftovers will be just few bytes in the generated image. Regarding other distributions, a clean /tmp at their first boot will surely not be a bad idea anyway. Change-Id: I2b0f8864bc4909542d924f5bd9296dca5d0189f2
This commit is contained in:
parent
76f64ae0da
commit
37572a548c
@ -106,6 +106,9 @@ function finalise_base () {
|
||||
sudo mv $TMP_MOUNT_PATH/etc/resolv.conf.ORIG $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
# Cleanup /tmp in the guest, so there is less cruft left there
|
||||
unmount_dir $TMP_MOUNT_PATH/tmp
|
||||
find $TMP_MOUNT_PATH/tmp -maxdepth 1 -mindepth 1 | xargs sudo rm -rf --one-file-system
|
||||
}
|
||||
|
||||
function compress_and_save_image () {
|
||||
|
Loading…
Reference in New Issue
Block a user