Commit 0a5b6826 by Xavier Antoviaque

vagrant: Add flag to ensure install is completed at least once

The provisioning script used to check for the existence of the
`/opt/edx/node_modules` folder to decide if the installation has already
been completed. However, since additional instructions were executed
by the installer afterwards, any installation error (eg. download
timeouts on low quality connections) happening between the creation of
that folder and the end of the installation wouldn't be recovered from
on the next vagrant instance boot.
parent 5658e6bc
......@@ -106,6 +106,9 @@ on_create()
# Permissions
chown vagrant.vagrant ~vagrant/.bash_profile
# Install completed entirely & successfully - set flag to skip in future runs
touch /opt/edx/.install_succeeded
cat << EOF
==============================================================================
Success - Created your development environment!
......@@ -115,8 +118,7 @@ EOF
} # End on_create() ########################################################
## only initialize / setup the development environment once:
# we create node_modules, so that's a good test:
[[ -d /opt/edx/node_modules ]] || on_create
[[ -f /opt/edx/.install_succeeded ]] || on_create
# grab what the Vagrantfile spec'd our IP to be:
# expecting:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment