Explicitly specify full path to (pre)-postinstall scripts on the box being built #352

wants to merge 2 commits into


None yet

3 participants

konstan commented Aug 7, 2012

I had this case with building Win7 box, which uses cygwin's sshd

  1. scp (in provider/core/box/build.rb) initiated copy of postinstall.sh file with the path on the box being ./postinstall.sh ie. relative to the login directory; which in case of cygwin is / if the user hasn't started cygwin shell from Windows yet
  2. I started cygwin shell that automatically created /home/myusername directory associating it with the home for this user
  3. successive exec of "chmod +x ./postinstall.sh" on the box failed not being able to find the file as the file is located in / but this login ended up in /home/myusername.

This happened because there was a considerable delay (15-30 sec) between completion of scp (step 1.) and execution of exec (step 3.) commands when I just clicked on Cygwin icon on Windows desktop. Sorry, I didn't dig into this. This could be either timeouts in the calling code or this could be related to some delays in the ssh port forwarded connection due to my Mac's or VirtualBox configurations.

However, I think, it would be good to always explicitly specify the location of the target remote file so that it can always be found in a predefined place. I set it to /tmp ... but it can be anything else.


konstan commented Aug 7, 2012

Sorry. The merge 001c0e6 have to be ignored.


@konstan would it help if veewee checks/creates the homedirectory first before putting the files ? This would allow the files to be in the right spot for that user. Not sure if windows user creation will like this that the homedir is already there.

mpapis commented Sep 30, 2014

now 1) this is far to outdated, 2) is this still a problem 3) does the fix still apply? - maybe could you rebase the fix?

@mpapis mpapis added the need info label Sep 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment