Disable /tmp cleanup on start for base debian boxes

References #68
This commit is contained in:
Fabio Rehm 2013-05-01 22:22:58 -03:00
parent 06a0d66616
commit 37cf1e4e31

View file

@ -208,6 +208,13 @@ add_ssh_key()
fi
}
disable_tmp_cleanup() {
rootfs=$1
chroot $rootfs /usr/sbin/update-rc.d -f checkroot-bootclean.sh remove
chroot $rootfs /usr/sbin/update-rc.d -f mountall-bootclean.sh remove
chroot $rootfs /usr/sbin/update-rc.d -f mountnfs-bootclean.sh remove
}
usage()
{
cat <<EOF
@ -317,6 +324,12 @@ fi
add_ssh_key vagrant
# vagrant and / or plugins might mount some shared folders under /tmp by default
# (like puppet manifests) and we need to make sure no shared folder gets its
# contents removed because of it. For more information, please check:
# https://github.com/fgrehm/vagrant-lxc/issues/68
disable_tmp_cleanup $rootfs
echo ""
echo "##"
echo "# The default user is 'vagrant' with password 'vagrant'!"