scripts/vagrant: Make the Box as Small as possible

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I23b92fb6ef7d1169712f81d6d842db3981b8f764
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Maciej Wawryk 2020-02-10 10:36:07 +01:00 committed by Tomasz Zawadzki
parent 58e6ef44f8
commit 22310f6176

View File

@ -310,6 +310,16 @@ EOF
if [ ${VAGRANT_PACKAGE_BOX} == 1 ]; then
cd "$VAGRANTFILE_DIR"
vagrant ssh -c 'sudo spdk_repo/spdk/scripts/vagrant/update.sh'
if [[ $SPDK_VAGRANT_DISTRO =~ "ubuntu" ]]; then
vagrant ssh -c 'sudo apt-get clean'
elif [[ $SPDK_VAGRANT_DISTRO =~ "fedora" ]]; then
vagrant ssh -c 'sudo dnf clean all'
elif [[ $SPDK_VAGRANT_DISTRO =~ "centos" ]]; then
vagrant ssh -c 'sudo yum clean all'
elif [[ $SPDK_VAGRANT_DISTRO =~ "freebsd" ]]; then
vagrant ssh -c 'sudo pkg clean -ay'
fi
vagrant ssh -c 'cat /dev/null > ~/.bash_history && history -c'
fi
echo ""
echo " SUCCESS!"