You might be able to get away with adding the command `bash -l` into your provision script after the exports but you will need an exit at the end to compensate.
On Sat, Feb 15, 2014 at 1:25 PM, Matej Macak <[email protected]> wrote: > Hi Mitchell, > > is SSH/TCP restart something I can do by specifying it within Vagrantfile? > My project is to create IPython Notebook Server for students so that they > can learn how to use one specific library that requires change of path to > be installed correctly. In the ideal scenario, they would not need to do > anything else but writing "vagrant up" in the terminal. Because of the > requirement of system path change, the only way how I could get it > operational is via your suggestion: > > > 1. Ending the IPython Notebook Server > 2. SSH into Vagrant and change the path > 3. Run the scrip to finish install > 4. Run the IPython Notebook Server again > > If I could specify all of this within my Vagrantfile or my provision > script it would make it a lot easier for students to set up. > > Thanks in advance! > > Best, > > Matej > > On Saturday, February 15, 2014 6:12:30 PM UTC, Mitchell Hashimoto wrote: > >> Matej, >> >> Vagrant doesn't disconnect the SSH session between different >> provisioners, so they're not picking up the change. You'll have to force >> Vagrant to disconnect the SSH session so it can try to reconnect. To do >> that, you can kill SSH and restart it or simply force kill the TCP >> connection using whatever OS-specific means are necessary. In that case, >> Vagrant will attempt to reconnect. >> >> Best, >> Mitchell >> >> >> On Sat, Feb 15, 2014 at 1:50 AM, Matej Macak <[email protected]> wrote: >> >>> Running the following commands in the shell provisioning script does not >>> change the system path (as it does when this is run in the terminal). I was >>> using precise 64 box: >>> >>> echo 'export PATH="/usr/local/x86_64/bin:$PATH"' >> ~/.profile >>> >>> echo 'export PATH="/usr/local/x86_64/bin:$PATH"' >> ~/.bashrc >>> >>> export PATH="/usr/local/x86_64/bin:$PATH" >>> >>> >>> The path is neither changed during provisioning so the later commands >>> are not executed as if the path was modified nor are the lines from echo >>> commands actually inserted into the .profile or .bashrc files. Running >>> commands with root access (i.e. sudo) makes no difference. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Vagrant" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
